Browse Source

WebGLShadowMap: fix spotlight shadow updating

jaxry 8 years ago
parent
commit
f5c9a8abd3
1 changed files with 6 additions and 6 deletions
  1. 6 6
      src/renderers/webgl/WebGLShadowMap.js

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

@@ -134,6 +134,12 @@ function WebGLShadowMap( _renderer, _lights, _objects, capabilities ) {
 
 
 			}
 			}
 
 
+			if ( shadow.isSpotLightShadow ) {
+
+				shadow.update( light );
+
+			}
+
 			var shadowCamera = shadow.camera;
 			var shadowCamera = shadow.camera;
 			var shadowMatrix = shadow.matrix;
 			var shadowMatrix = shadow.matrix;
 
 
@@ -221,12 +227,6 @@ function WebGLShadowMap( _renderer, _lights, _objects, capabilities ) {
 
 
 			}
 			}
 
 
-			if ( shadow.isSpotLightShadow ) {
-
-				shadow.update( light );
-
-			}
-
 			var shadowMap = shadow.map;
 			var shadowMap = shadow.map;
 
 
 			_renderer.setRenderTarget( shadowMap );
 			_renderer.setRenderTarget( shadowMap );