From 6599417ca1bf4803ce89546452f5be98fd099760 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 4 Oct 2008 11:39:14 +0000 Subject: [PATCH] Fix bug in shader generator --- panda/src/pgraph/shaderGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/pgraph/shaderGenerator.cxx b/panda/src/pgraph/shaderGenerator.cxx index 7ef1286e4e..23fbaf6e85 100644 --- a/panda/src/pgraph/shaderGenerator.cxx +++ b/panda/src/pgraph/shaderGenerator.cxx @@ -651,7 +651,7 @@ synthesize_shader(const RenderState *rs) { for (int i=0; i<(int)_alights.size(); i++) { text << "\t // Ambient Light " << i << "\n"; text << "\t lcolor = alight_alight" << i << ";\n"; - if (_separate_ambient_diffuse) { + if (_separate_ambient_diffuse && _have_ambient) { text << "\t tot_ambient += lcolor;\n"; } else { text << "\t tot_diffuse += lcolor;\n";