Skip to content

Commit e23e457

Browse files
authored
ShadowNode: Fix VSM with point lights. (#31103)
1 parent 0eed4b5 commit e23e457

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/nodes/lighting/ShadowNode.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ class ShadowNode extends ShadowBaseNode {
417417

418418
// VSM
419419

420-
if ( shadowMapType === VSMShadowMap ) {
420+
if ( shadowMapType === VSMShadowMap && light.isPointLight !== true ) {
421421

422422
depthTexture.compareFunction = null; // VSM does not use textureSampleCompare()/texture2DCompare()
423423

@@ -497,7 +497,7 @@ class ShadowNode extends ShadowBaseNode {
497497

498498
}
499499

500-
const shadowDepthTexture = ( shadowMapType === VSMShadowMap ) ? this.vsmShadowMapHorizontal.texture : depthTexture;
500+
const shadowDepthTexture = ( shadowMapType === VSMShadowMap && light.isPointLight !== true ) ? this.vsmShadowMapHorizontal.texture : depthTexture;
501501

502502
const shadowNode = this.setupShadowFilter( builder, { filterFn, shadowTexture: shadowMap.texture, depthTexture: shadowDepthTexture, shadowCoord, shadow, depthLayer: this.depthLayer } );
503503

0 commit comments

Comments
 (0)