quakeforge/libs/video/renderer/vulkan/shader/light_flat.vert
Bill Currie 85128a3e86 [vulkan] Rework lighting to use splats
It's currently slower, and the cone splats are buggy, but the lighting
code itself got some nice cleanups.
2023-06-28 01:01:56 +09:00

13 lines
307 B
GLSL

#version 450
layout (location = 0) in uint light_index;
layout (location = 0) out uint light_index_out;
void
main ()
{
float x = (gl_VertexIndex & 2);
float y = (gl_VertexIndex & 1);
gl_Position = vec4 (2, 4, 0, 1) * vec4 (x, y, 0, 1) - vec4 (1, 1, 0, 0);
light_index_out = light_index;
}