Implement strand selection visualisation but without any shading. I think this is not the overlay job to draw the strands shaded. We can already view the children strands shaded for now but we might add an option to draw the shaded strand instead of (or in addition to) the guide strand.
24 lines
359 B
GLSL
24 lines
359 B
GLSL
uniform mat4 ModelViewProjectionMatrix;
|
|
|
|
in vec4 finalColor;
|
|
#ifdef USE_POINTS
|
|
in vec2 radii;
|
|
#endif
|
|
|
|
out vec4 fragColor;
|
|
|
|
void main()
|
|
{
|
|
fragColor = finalColor;
|
|
|
|
#ifdef USE_POINTS
|
|
float dist = length(gl_PointCoord - vec2(0.5));
|
|
|
|
fragColor.a = mix(finalColor.a, 0.0, smoothstep(radii[1], radii[0], dist));
|
|
|
|
if (fragColor.a == 0.0) {
|
|
discard;
|
|
}
|
|
#endif
|
|
}
|