quakeforge/libs/video/renderer/vulkan/shader/light_oit.frag
Bill Currie 8890e14208 [vulkan] Use OIT to visualize the light hulls
Using the translucency pass made it easy to have depth-tested
translucent "solid" light volumes instead of always visible lines (which
are still an option as that's useful too). Most importantly, being able
to see the surfaces helped no end in figuring out that my hulls were
created with counter-clockwise windings instead of quake's usual
clockwise windings and thus my hulls were being rendered inside-out in
the occlusion pass.
2023-12-17 18:45:02 +09:00

16 lines
335 B
GLSL

#version 450
#extension GL_GOOGLE_include_directive : enable
#extension GL_EXT_multiview : enable
#include "oit_store.finc"
layout (location = 0) flat in uint light_index;
layout(early_fragment_tests) in;
void
main (void)
{
vec4 c = !gl_FrontFacing ? vec4 (1, 0, 1, 0.05) : vec4 (0, 1, 1, 0.05);
StoreFrag (c, gl_FragCoord.z);
}