From f741c9476f2d32a846562819e3a9b3a4961f965c Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 10 Feb 2019 16:19:24 +0100 Subject: [PATCH] display: fix lighting being disabled when only AmbientLight is on --- panda/src/display/graphicsStateGuardian.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index 93a3f36651..233d47bc09 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -2823,6 +2823,12 @@ do_issue_light() { } } else { + // Don't forget to still enable lighting if we have only an ambient light. + if (!_lighting_enabled) { + enable_lighting(true); + _lighting_enabled = true; + } + set_ambient_light(target_light->get_ambient_contribution()); }