quakeforge/libs/video/renderer/vulkan/shader/particle.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

20 lines
303 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 *= sqrt (a);
frag_color = c;
}