From 4fa00d01ea39e10fafc8e1fff20e1ad2c7f046b8 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Tue, 22 Jul 2025 20:23:53 +0200 Subject: [PATCH] Fix sunlight artifact --- wadsrc/static/shaders/lightmap/frag_resolve.glsl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wadsrc/static/shaders/lightmap/frag_resolve.glsl b/wadsrc/static/shaders/lightmap/frag_resolve.glsl index 4224a7a7e..7ad9e1361 100644 --- a/wadsrc/static/shaders/lightmap/frag_resolve.glsl +++ b/wadsrc/static/shaders/lightmap/frag_resolve.glsl @@ -33,7 +33,7 @@ void main() if (c.a == -1.0) { float count = 0.0; - c = vec4(0.0, 0.0, 0.0, -1.0); + c = vec4(0.0); for (int y = -1; y <= 1; y++) { for (int x = -1; x <= 1; x++) @@ -54,6 +54,8 @@ void main() } if (count != 0.0) c /= count; + else + c = vec4(0.0, 0.0, 0.0, -1.0); } fragcolor = c;