quakeforge/libs/video/renderer/vulkan/shader/particle.frag
Bill Currie b81a77c3f7 [vulkan] Get particle colors working for id style
This required making the texture set accessible to the vertex shader
(instead of using a dedicated palette set), which I don't particularly
like, but I don't feel like dealing with the texture code's hard-coded
use of the texture set. QF style particles need something mostly for the
smoke puffs as they expect a texture.
2022-11-28 22:57:22 +09:00

20 lines
296 B
GLSL

#version 450
layout (location = 0) in vec4 uv_tr;
layout (location = 1) in vec4 color;
layout (location = 0) out vec4 frag_color;
void
main (void)
{
vec4 c = color;
vec2 x = uv_tr.xy;
float a = 1 - dot (x, x);
if (a <= 0) {
discard;
}
c *= (a);
frag_color = c;
}