@@ -110,7 +110,7 @@ const VSMPassVertical = /*@__PURE__*/ Fn( ( { samples, radius, size, shadowPass,
110
110
111
111
let depth = shadowPass . sample ( add ( screenCoordinate . xy , vec2 ( 0 , uvOffset ) . mul ( radius ) ) . div ( size ) ) ;
112
112
113
- if ( shadowPass . value . isDepthArrayTexture || shadowPass . value . isDataArrayTexture ) {
113
+ if ( shadowPass . value . isArrayTexture ) {
114
114
115
115
depth = depth . depth ( depthLayer ) ;
116
116
@@ -156,7 +156,7 @@ const VSMPassHorizontal = /*@__PURE__*/ Fn( ( { samples, radius, size, shadowPas
156
156
157
157
let distribution = shadowPass . sample ( add ( screenCoordinate . xy , vec2 ( uvOffset , 0 ) . mul ( radius ) ) . div ( size ) ) ;
158
158
159
- if ( shadowPass . value . isDepthArrayTexture || shadowPass . value . isDataArrayTexture ) {
159
+ if ( shadowPass . value . isArrayTexture ) {
160
160
161
161
distribution = distribution . depth ( depthLayer ) ;
162
162
@@ -421,11 +421,11 @@ class ShadowNode extends ShadowBaseNode {
421
421
422
422
depthTexture . compareFunction = null ; // VSM does not use textureSampleCompare()/texture2DCompare()
423
423
424
- if ( shadowMap . isRenderTargetArray ) {
424
+ if ( shadowMap . depth > 1 ) {
425
425
426
426
if ( ! shadowMap . _vsmShadowMapVertical ) {
427
427
428
- shadowMap . _vsmShadowMapVertical = builder . createRenderTargetArray ( shadow . mapSize . width , shadow . mapSize . height , shadowMap . depth , { format : RGFormat , type : HalfFloatType , depthBuffer : false } ) ;
428
+ shadowMap . _vsmShadowMapVertical = builder . createRenderTarget ( shadow . mapSize . width , shadow . mapSize . height , { format : RGFormat , type : HalfFloatType , depth : shadowMap . depth , depthBuffer : false } ) ;
429
429
shadowMap . _vsmShadowMapVertical . texture . name = 'VSMVertical' ;
430
430
431
431
}
@@ -434,7 +434,7 @@ class ShadowNode extends ShadowBaseNode {
434
434
435
435
if ( ! shadowMap . _vsmShadowMapHorizontal ) {
436
436
437
- shadowMap . _vsmShadowMapHorizontal = builder . createRenderTargetArray ( shadow . mapSize . width , shadow . mapSize . height , shadowMap . depth , { format : RGFormat , type : HalfFloatType , depthBuffer : false } ) ;
437
+ shadowMap . _vsmShadowMapHorizontal = builder . createRenderTarget ( shadow . mapSize . width , shadow . mapSize . height , { format : RGFormat , type : HalfFloatType , depth : shadowMap . depth , depthBuffer : false } ) ;
438
438
shadowMap . _vsmShadowMapHorizontal . texture . name = 'VSMHorizontal' ;
439
439
440
440
}
@@ -451,15 +451,15 @@ class ShadowNode extends ShadowBaseNode {
451
451
452
452
let shadowPassVertical = texture ( depthTexture ) ;
453
453
454
- if ( depthTexture . isDepthArrayTexture ) {
454
+ if ( depthTexture . isArrayTexture ) {
455
455
456
456
shadowPassVertical = shadowPassVertical . depth ( this . depthLayer ) ;
457
457
458
458
}
459
459
460
460
let shadowPassHorizontal = texture ( this . vsmShadowMapVertical . texture ) ;
461
461
462
- if ( depthTexture . isDepthArrayTexture ) {
462
+ if ( depthTexture . isArrayTexture ) {
463
463
464
464
shadowPassHorizontal = shadowPassHorizontal . depth ( this . depthLayer ) ;
465
465
@@ -503,7 +503,7 @@ class ShadowNode extends ShadowBaseNode {
503
503
504
504
let shadowColor = texture ( shadowMap . texture , shadowCoord ) ;
505
505
506
- if ( depthTexture . isDepthArrayTexture ) {
506
+ if ( depthTexture . isArrayTexture ) {
507
507
508
508
shadowColor = shadowColor . depth ( this . depthLayer ) ;
509
509
0 commit comments