20/shaders/quad.vert

11 lines
207 B
GLSL
Raw Permalink Normal View History

2024-01-02 17:06:44 +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]
}