瀏覽代碼

setting default overflow behavior for lights

David Catuhe 8 年之前
父節點
當前提交
6d36388f19
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/Materials/babylon.materialHelper.ts

+ 3 - 3
src/Materials/babylon.materialHelper.ts

@@ -12,7 +12,7 @@
 
                 if (!light.isEnabled()) {
                     if (defines["LIGHT" + lightIndex] !== undefined) {
-                        defines["LIGHT" + lightIndex] = undefined;
+                        defines["LIGHT" + lightIndex] = false;
                     }
                     continue;
                 }
@@ -45,7 +45,7 @@
 
                 if (!light.canAffectMesh(mesh)) {
                     if (defines["LIGHT" + lightIndex] !== undefined) {
-                        defines["LIGHT" + lightIndex] = undefined;
+                        defines["LIGHT" + lightIndex] = false;
                     }
                     continue;
                 }
@@ -130,7 +130,7 @@
             // Resetting all other lights if any
             for (var index = scene.lights.length; index < maxSimultaneousLights; index++) {
                 if (defines["LIGHT" + lightIndex] !== undefined) {
-                    defines["LIGHT" + lightIndex] = undefined;
+                    defines["LIGHT" + lightIndex] = false;
                 }
             }