Просмотр исходного кода

ShadowNode: Fix VSM with point lights. (#31103)

Michael Herzog 10 месяцев назад
Родитель
Сommit
e23e4572a6
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/nodes/lighting/ShadowNode.js

+ 2 - 2
src/nodes/lighting/ShadowNode.js

@@ -417,7 +417,7 @@ class ShadowNode extends ShadowBaseNode {
 
 
 		// VSM
 		// VSM
 
 
-		if ( shadowMapType === VSMShadowMap ) {
+		if ( shadowMapType === VSMShadowMap && light.isPointLight !== true ) {
 
 
 			depthTexture.compareFunction = null; // VSM does not use textureSampleCompare()/texture2DCompare()
 			depthTexture.compareFunction = null; // VSM does not use textureSampleCompare()/texture2DCompare()
 
 
@@ -497,7 +497,7 @@ class ShadowNode extends ShadowBaseNode {
 
 
 		}
 		}
 
 
-		const shadowDepthTexture = ( shadowMapType === VSMShadowMap ) ? this.vsmShadowMapHorizontal.texture : depthTexture;
+		const shadowDepthTexture = ( shadowMapType === VSMShadowMap && light.isPointLight !== true ) ? this.vsmShadowMapHorizontal.texture : depthTexture;
 
 
 		const shadowNode = this.setupShadowFilter( builder, { filterFn, shadowTexture: shadowMap.texture, depthTexture: shadowDepthTexture, shadowCoord, shadow, depthLayer: this.depthLayer } );
 		const shadowNode = this.setupShadowFilter( builder, { filterFn, shadowTexture: shadowMap.texture, depthTexture: shadowDepthTexture, shadowCoord, shadow, depthLayer: this.depthLayer } );
 
 

粤ICP备19079148号