// Fullscreen triangle, no vertex buffer needed. out vec2 UV; void main() { vec2 p = vec2(float((gl_VertexID << 1) & 2), float(gl_VertexID & 2)); UV = p; gl_Position = vec4(p * 2.0 - 1.0, 0.0, 1.0); }