Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
translate ▾

Modern-Apps.git / games / voxels / src / main / rust / shaders / post.vert

post.vert8 lines · 305 BRaw
1#version 450
2// Fullscreen triangle with 0..1 uv (uv.y=0 at the top, matching Vulkan framebuffer/texture origin).
3layout(location=0) out vec2 vUv;
4void main() {
5 vec2 p = vec2(float((gl_VertexIndex << 1) & 2), float(gl_VertexIndex & 2));
6 vUv = p;
7 gl_Position = vec4(p * 2.0 - 1.0, 0.0, 1.0);
8}