Files
comaps/libs/shaders/GL/circle_point.fsh.glsl
renderexpert 897d7a253d Refactor shaders to use GLES3 syntax
Signed-off-by: renderexpert <expert@renderconsulting.co.uk>
2025-08-17 08:30:56 +02:00

21 lines
440 B
GLSL

uniform float u_opacity;
in vec3 v_radius;
in vec4 v_color;
const float kAntialiasingScalar = 0.9;
out vec4 v_FragColor;
void main()
{
float d = dot(v_radius.xy, v_radius.xy);
vec4 finalColor = v_color;
float aaRadius = v_radius.z * kAntialiasingScalar;
float stepValue = smoothstep(aaRadius * aaRadius, v_radius.z * v_radius.z, d);
finalColor.a = finalColor.a * u_opacity * (1.0 - stepValue);
v_FragColor = finalColor;
}