瀏覽代碼

Fix: wrong face cull for shadows of freshly inserted mirrored objects.

Ondřej Španěl 6 年之前
父節點
當前提交
1968a0d745
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/renderers/webgl/WebGLShadowMap.js

+ 1 - 0
src/renderers/webgl/WebGLShadowMap.js

@@ -383,6 +383,7 @@ function WebGLShadowMap( _renderer, _objects, maxTextureSize ) {
 			if ( object.castShadow && ( ! object.frustumCulled || _frustum.intersectsObject( object ) ) ) {
 			if ( object.castShadow && ( ! object.frustumCulled || _frustum.intersectsObject( object ) ) ) {
 
 
 				object.modelViewMatrix.multiplyMatrices( shadowCamera.matrixWorldInverse, object.matrixWorld );
 				object.modelViewMatrix.multiplyMatrices( shadowCamera.matrixWorldInverse, object.matrixWorld );
+				object.normalMatrix.getNormalMatrix( object.modelViewMatrix );
 
 
 				var geometry = _objects.update( object );
 				var geometry = _objects.update( object );
 				var material = object.material;
 				var material = object.material;