quakeforge/libs/video/renderer/vulkan/shader/sprite_depth.frag
Bill Currie db6c76d583 [vulkan] Abandon bindless rendering
At least for now, it is more trouble than it is worth as it (or my
implementation of it) breaks lavapipe and renderdoc.
2021-12-24 06:45:13 +09:00

24 lines
365 B
GLSL

#version 450
layout (set = 1, binding = 1) uniform sampler2DArray Texture;
layout (push_constant) uniform PushConstants {
layout (offset = 64)
int frame;
int spriteind;
// two slots
vec4 fog;
};
layout (location = 0) in vec2 st;
void
main (void)
{
vec4 pix;
pix = texture (Texture, vec3 (st, frame));
if (pix.a < 0.5) {
discard;
}
}