提交 978b7b1f 编写于 作者: M Mr.doob

WebGLShadowMap: Clean up.

上级 f2690c6b
......@@ -119,7 +119,7 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
var light = _lights[ i ];
if ( ! light.castShadow ) continue;
if ( light.castShadow === false ) continue;
if ( light instanceof THREE.PointLight ) {
......@@ -162,7 +162,7 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
}
if ( ! light.shadowMap ) {
if ( light.shadowMap === null ) {
var shadowFilter = THREE.LinearFilter;
......@@ -178,9 +178,7 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
light.shadowMatrix = new THREE.Matrix4();
}
if ( light.shadowCamera.parent === null ) {
//
if ( light instanceof THREE.SpotLight ) {
......@@ -190,10 +188,6 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
light.shadowCamera.updateProjectionMatrix();
scene.add( light.shadowCamera );
if ( scene.autoUpdate === true ) scene.updateMatrixWorld();
}
var shadowMap = light.shadowMap;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册