Make the text's color lerping safer

This commit is contained in:
Jupeyy 2021-10-21 16:34:16 +02:00
parent 4601f7500e
commit 7b53258e62

View file

@ -30,5 +30,8 @@ void main()
float RealAlpha = (textOutlineFrag.a + textColor.a);
// simply add the color we will loose through blending
FragClr = vec4(finalFragColor / RealAlpha, RealAlpha);
if(RealAlpha > 0.0)
FragClr = vec4(finalFragColor / RealAlpha, RealAlpha);
else
FragClr = vec4(0.0, 0.0, 0.0, 0.0);
}