mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-12-03 17:42:40 +00:00
b81a77c3f7
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.
20 lines
296 B
GLSL
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;
|
|
}
|