#version 450 // One triangle over the whole target, from the vertex index alone: the // fragment shaders work in pixels (gl_FragCoord). void main() { vec2 p = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2); gl_Position = vec4(p * 2.0 - 1.0, 0.0, 1.0); }