summaryrefslogtreecommitdiff
path: root/shaders/post.vert.glsl
blob: 86739a6571cc908f75727cc2d398e9d2e70184d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#version 450

// A post pass (docs/render-pipeline.md §6): one fullscreen triangle from
// gl_VertexIndex, no vertex buffer. The Shadertoy fragment shader works from
// gl_FragCoord, y down, as its fragCoord.

void main() {
    vec2 p = vec2(float((gl_VertexIndex << 1) & 2), float(gl_VertexIndex & 2));
    gl_Position = vec4(p * 2.0 - 1.0, 0.0, 1.0);
}