Edit Mesh: Fix blending function of edges

This fix the ugly (usually) dark outline that was around selected edges.
This commit is contained in:
Clément Foucault
2018-06-14 21:45:02 +02:00
parent dc25e69c2d
commit 7afa59e37a

View File

@@ -94,7 +94,10 @@ float distToEdge(vec2 o, vec2 dir)
#ifdef ANTI_ALIASING
void colorDistEdge(vec4 color, float dist)
{
/* May not work if color.a is not 1.0. */
FragColor.rgb *= FragColor.a;
FragColor = mix(color, FragColor, clamp(dist, 0.0, 1.0));
FragColor.rgb /= FragColor.a;
}
#else
#define colorDistEdge colorDist