blob: 1c9f3b1e7a1f9e24c39c7cea527be5cd96c58cbc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
precision mediump float;
varying vec3 v_color;
void main() {
// Create a circular particle with soft edges
vec2 center = gl_PointCoord - vec2(0.5);
float dist = length(center);
if (dist > 0.5) {
discard;
}
float alpha = 1.0 - smoothstep(0.0, 0.5, dist);
gl_FragColor = vec4(v_color, alpha * 0.3); // Subtle opacity
}
|