Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-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). |
| 3 | layout(location=0) out vec2 vUv; |
| 4 | void 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 | } |