From 61a089ad59082dba51e946bb8d268002ac42bf7a Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 22 Nov 2020 14:23:46 +0100 Subject: [PATCH] ShaderGenerator: don't output unused attr_ambient input variable --- panda/src/pgraphnodes/shaderGenerator.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/panda/src/pgraphnodes/shaderGenerator.cxx b/panda/src/pgraphnodes/shaderGenerator.cxx index f0e14baa06..6c9b9b8a03 100644 --- a/panda/src/pgraphnodes/shaderGenerator.cxx +++ b/panda/src/pgraphnodes/shaderGenerator.cxx @@ -1094,7 +1094,9 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { text << "\t uniform float4 clipplane_" << i << ",\n"; } - text << "\t uniform float4 attr_ambient,\n"; + if (key._lighting) { + text << "\t uniform float4 attr_ambient,\n"; + } text << "\t uniform float4 attr_colorscale\n"; text << ") {\n";