Edit Mode: Fix bad display of edges when limit selection mode is Off.

This commit is contained in:
2018-06-15 22:09:10 +02:00
parent 5600296c9d
commit d45d094378

View File

@@ -86,10 +86,9 @@ 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;
FragColor.rgb /= max(1e-8, FragColor.a);
}
#else
#define colorDistEdge colorDist