#version 450 // CRT post-process pass: one fullscreen triangle from gl_VertexIndex, no // vertex buffer. The fragment shader derives uv from gl_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); }