mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-12-13 14:10:57 +00:00
00cade072c
It's a bit flaky for particles, especially at higher frame rates, but that's due to supporting only 64 overlapping pixels. A reasonable solution is probably switching to a priority heap for the "sort" and upping the limit.
22 lines
375 B
GLSL
22 lines
375 B
GLSL
#version 450
|
|
#extension GL_GOOGLE_include_directive : enable
|
|
#include "oit_store.finc"
|
|
|
|
layout (location = 0) in vec4 uv_tr;
|
|
layout (location = 1) in vec4 color;
|
|
|
|
layout(early_fragment_tests) in;
|
|
|
|
void
|
|
main (void)
|
|
{
|
|
vec4 c = color;
|
|
vec2 x = uv_tr.xy;
|
|
|
|
float a = 1 - dot (x, x);
|
|
if (a <= 0) {
|
|
discard;
|
|
}
|
|
c *= (a);
|
|
StoreFrag (c, gl_FragCoord.z);
|
|
}
|