From 2c5cebe7e090192eb816082b854a06dc318b0cc5 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 23 Aug 2024 14:13:46 +0200 Subject: [PATCH] display: Fix shader gen regression for more than 2 lights --- panda/src/display/graphicsStateGuardian.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index 85cf8cfd78..0f160a55f4 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -1703,7 +1703,7 @@ fetch_specified_part(Shader::ShaderMatInput part, InternalName *name, } } - into += i * 4; + into += 4; } // Apply the default OpenGL lights otherwise. // Special exception for light 0, which defaults to white. @@ -1719,7 +1719,7 @@ fetch_specified_part(Shader::ShaderMatInput part, InternalName *name, into[1].set(1, 0, 0, 0); into[2].set(0, 0, 0, 0); into[3].set(0, 0, 0, 0); - into += i * 4; + into += 4; } return; }