blob: d9461e96e22c713eb1ea16583f2bcb59f922ab1f (
plain) (
blame)
1
2
3
4
5
6
7
|
#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);
}
|