From 85212e271d8a78716ddc6166758b0164f98033b6 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Mon, 7 Jul 2025 02:15:59 +0300 Subject: [PATCH] fix --- res/shaders/lib/lighting.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/shaders/lib/lighting.glsl b/res/shaders/lib/lighting.glsl index d442c64f..2d164c30 100644 --- a/res/shaders/lib/lighting.glsl +++ b/res/shaders/lib/lighting.glsl @@ -8,7 +8,7 @@ uniform float u_weatherFogDencity; uniform float u_weatherFogCurve; float calc_torch_light(vec3 normal, vec3 modelpos) { - return max(0.0, 1.0 - distance(u_cameraPos, modelpos) / u_torchlightDistance) * -dot(normal, normalize(modelpos - u_cameraPos)); + return max(0.0, 1.0 - distance(u_cameraPos, modelpos) / u_torchlightDistance) * max(0.0, -dot(normal, normalize(modelpos - u_cameraPos))); } vec3 calc_screen_normal(vec3 normal) {