浏览代码

display: fix lighting being disabled when only AmbientLight is on

rdb 6 年之前
父节点
当前提交
f741c9476f
共有 1 个文件被更改,包括 6 次插入0 次删除
  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());
   }