2025-05-01 19:25:13 +00:00
|
|
|
#version 300 es
|
|
|
|
|
|
|
|
precision highp float;
|
|
|
|
|
2025-06-02 15:56:06 +00:00
|
|
|
in vec4 point_color;
|
2025-05-01 19:25:13 +00:00
|
|
|
in float point_highlight;
|
|
|
|
in float total_radius;
|
|
|
|
|
|
|
|
out vec4 outColor;
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
float r = total_radius * length(2.*gl_PointCoord - vec2(1.));
|
|
|
|
|
|
|
|
const float POINT_RADIUS = 4.;
|
|
|
|
float border = smoothstep(POINT_RADIUS - 1., POINT_RADIUS, r);
|
2025-06-02 15:56:06 +00:00
|
|
|
float disk = 1. - smoothstep(total_radius - 1., total_radius, r);
|
|
|
|
vec4 color = mix(point_color, vec4(1.), border * point_highlight);
|
|
|
|
outColor = vec4(vec3(1.), disk) * color;
|
2025-05-01 19:25:13 +00:00
|
|
|
}
|