radar-gi/shaders/ppi.frag
2024-07-18 20:52:15 +08:00

32 lines
483 B
GLSL

#include "transform/polar.glsl"
in float x;
in float y;
in float value;
flat in vec4 vrange;
out vec4 FragColor;
void main() {
vec4 inversed = inverse(x, y);
if (inversed.x < vrange.x || inversed.x > vrange.z) {
discard;
}
vec4 result = <colormap(value)>;
if (result.w == 0.0) {
discard;
}
// result = texture(colormap_2, 1.0);
// vec4 result = vec4(value /10.0, value / 10.0, 1.0, value / 10.0);
FragColor = result;
}