Browse Source

display: fix lighting being disabled when only AmbientLight is on

rdb 6 years ago
parent
commit
f741c9476f
1 changed files with 6 additions and 0 deletions
  1. 6 0
      panda/src/display/graphicsStateGuardian.cxx

+ 6 - 0
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());
   }