2026-02-21 19:41:21 -08:00
|
|
|
#version 450
|
|
|
|
|
|
2026-02-21 21:57:16 -08:00
|
|
|
// Fullscreen triangle sky — no vertex buffer, no mesh.
|
|
|
|
|
// Draws 3 vertices covering the entire screen, depth forced to 1.0 (far plane).
|
2026-02-21 19:41:21 -08:00
|
|
|
|
2026-02-21 21:57:16 -08:00
|
|
|
layout(location = 0) out vec2 TexCoord;
|
2026-02-21 19:41:21 -08:00
|
|
|
|
|
|
|
|
void main() {
|
2026-02-21 21:57:16 -08:00
|
|
|
// Produces triangle covering NDC [-1,1]² with depth = 1.0 (far)
|
|
|
|
|
TexCoord = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2);
|
|
|
|
|
gl_Position = vec4(TexCoord * 2.0 - 1.0, 1.0, 1.0);
|
2026-02-21 19:41:21 -08:00
|
|
|
}
|