浏览代码

Merge pull request #20291 from Mugen87/dev35

WebGLShadowMap: Ensure undefined check works in render().
Mr.doob 4 年之前
父节点
当前提交
a50700b3e6
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/renderers/webgl/WebGLShadowMap.js

+ 2 - 2
src/renderers/webgl/WebGLShadowMap.js

@@ -97,8 +97,6 @@ function WebGLShadowMap( _renderer, _objects, maxTextureSize ) {
 			const light = lights[ i ];
 			const shadow = light.shadow;
 
-			if ( shadow.autoUpdate === false && shadow.needsUpdate === false ) continue;
-
 			if ( shadow === undefined ) {
 
 				console.warn( 'THREE.WebGLShadowMap:', light, 'has no shadow.' );
@@ -106,6 +104,8 @@ function WebGLShadowMap( _renderer, _objects, maxTextureSize ) {
 
 			}
 
+			if ( shadow.autoUpdate === false && shadow.needsUpdate === false ) continue;
+
 			_shadowMapSize.copy( shadow.mapSize );
 
 			const shadowFrameExtents = shadow.getFrameExtents();