quakeforge/libs/video/renderer/vulkan/shader/twod_depth.frag
Bill Currie 82d1a6e6cd [vulkan] Do a depth pass for 2d objects
While the HUD and status bar don't cut out a lot of screen (normally),
they might start to make a difference when I get transparency working
properly. The main thing is this is a step towards pulling the 2d
rendering into another render pass so the main deferred pass is
world-only.
2022-11-21 02:29:03 +09:00

17 lines
256 B
GLSL

#version 450
layout (set = 1, binding = 0) uniform sampler2D Texture;
layout (location = 0) in vec2 st;
layout (location = 1) in vec4 color;
void
main (void)
{
vec4 pix;
pix = texture (Texture, st);
if (pix.a * color.a < 1) {
discard;
}
}