From 97c9f8f709442cdb9b8661a41613dd1579ee3af2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20M=C3=BCller?= <34514239+appgurueu@users.noreply.github.com> Date: Wed, 29 Oct 2025 10:26:38 +0100 Subject: [PATCH] Fix wrong normal shading for objects (apply transform) --- client/shaders/object_shader/opengl_vertex.glsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/shaders/object_shader/opengl_vertex.glsl b/client/shaders/object_shader/opengl_vertex.glsl index 4bb109f681..be76a19444 100644 --- a/client/shaders/object_shader/opengl_vertex.glsl +++ b/client/shaders/object_shader/opengl_vertex.glsl @@ -104,9 +104,9 @@ void main(void) #else // This is intentional comparison with zero without any margin. // If normal is not equal to zero exactly, then we assume it's a valid, just not normalized vector - vIDiff = length(inVertexNormal) == 0.0 + vIDiff = length(vNormal) == 0.0 ? 1.0 - : directional_ambient(normalize(inVertexNormal)); + : directional_ambient(normalize(vNormal)); #endif vec4 color = inVertexColor;