diff --git a/src/flitter/render/window/glsl/standard_lighting.frag b/src/flitter/render/window/glsl/standard_lighting.frag index 581a4f13..09980893 100644 --- a/src/flitter/render/window/glsl/standard_lighting.frag +++ b/src/flitter/render/window/glsl/standard_lighting.frag @@ -103,5 +103,10 @@ void main() { if (monochrome) { final_color = vec3(srgb_luminance(final_color.rgb)); } - fragment_color = vec4(final_color * tint, opacity); + final_color *= tint; + if (any(isinf(final_color)) || any(isnan(final_color))) { + fragment_color = vec4(0.0); + } else { + fragment_color = vec4(final_color * tint, opacity); + } }