19 lines
330 B
GLSL
19 lines
330 B
GLSL
#version 450
|
|
|
|
layout (location = 0) out vec2 uv;
|
|
|
|
vec2 positions[6] = vec2[](
|
|
vec2(-1.0, -1.0),
|
|
vec2( 1.0, -1.0),
|
|
vec2(-1.0, 1.0),
|
|
vec2(-1.0, 1.0),
|
|
vec2( 1.0, -1.0),
|
|
vec2( 1.0, 1.0)
|
|
);
|
|
|
|
void main() {
|
|
vec2 pos = positions[gl_VertexIndex];
|
|
gl_Position = vec4(pos, 0.0, 1.0);
|
|
uv = pos * 0.5 + 0.5;
|
|
}
|