17/shaders/quad.vert

11 lines
207 B
GLSL
Raw Normal View History

2023-03-31 06:14:37 +00:00
#version 420 core
layout(location = 0) in vec3 pos;
out vec2 texCoord;
void main()
{
gl_Position = vec4(pos, 1.0);
texCoord = (pos.xy + vec2(1.0)) / 2; // Переход от [-1;1] к [0;1]
}