From 7b53258e62799273957f5b122080618f2f781299 Mon Sep 17 00:00:00 2001 From: Jupeyy Date: Thu, 21 Oct 2021 16:34:16 +0200 Subject: [PATCH] Make the text's color lerping safer --- data/shader/text.frag | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/data/shader/text.frag b/data/shader/text.frag index 47aa8d6cd..5b0bf408d 100644 --- a/data/shader/text.frag +++ b/data/shader/text.frag @@ -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); }