veloren/assets/voxygen/shaders/blit-vert.glsl

16 lines
320 B
Plaintext
Raw Normal View History

2023-10-18 20:50:40 +00:00
#version 430 core
2021-03-20 08:03:42 +00:00
layout(location = 0) out vec2 uv;
void main() {
// Generate fullscreen triangle
vec2 v_pos = vec2(
float(gl_VertexIndex / 2) * 4.0 - 1.0,
float(gl_VertexIndex % 2) * 4.0 - 1.0
);
uv = (v_pos * vec2(1.0, -1.0) + 1.0) * 0.5;
gl_Position = vec4(v_pos, 0.0, 1.0);
}