Преглед изворни кода

This makes sure that the lights are counted correctly based on their visibility. This fixes #4439.

OpenShift guest пре 12 година
родитељ
комит
a89b036995
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/renderers/WebGLRenderer.js

+ 1 - 1
src/renderers/WebGLRenderer.js

@@ -6517,7 +6517,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 			var light = lights[ l ];
 
-			if ( light.onlyShadow ) continue;
+			if ( light.onlyShadow || light.visible === false ) continue;
 
 			if ( light instanceof THREE.DirectionalLight ) dirLights ++;
 			if ( light instanceof THREE.PointLight ) pointLights ++;

粤ICP备19079148号