Skip to content

Commit 07d2b72

Browse files
committed
address review comment for multiview rendering
1 parent 4583f6e commit 07d2b72

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/renderers/common/Textures.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class Textures extends DataMap {
147147

148148
const texture = textures[ i ];
149149

150-
texture.isTextureArray = size.depth > 1;
150+
texture.isTextureArray = this.renderer.xr.useMultiview() === true && size.depth > 1;
151151
if ( textureNeedsUpdate ) texture.needsUpdate = true;
152152

153153
this.updateTexture( texture, options );

src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -569,13 +569,13 @@ ${ flowData.code }
569569

570570
}
571571

572-
} else if ( texture.isDataArrayTexture === true || texture.isCompressedArrayTexture === true || texture.isTextureArray === true ) {
572+
} else if ( uniform.type === 'texture3D' && texture.isTextureArray === false ) {
573573

574-
snippet = `${typePrefix}sampler2DArray ${ uniform.name };`;
574+
snippet = `${typePrefix}sampler3D ${ uniform.name };`;
575575

576-
} else if ( uniform.type === 'texture3D' ) {
576+
} else if ( texture.isDataArrayTexture === true || texture.isCompressedArrayTexture === true || texture.isTextureArray === true ) {
577577

578-
snippet = `${typePrefix}sampler3D ${ uniform.name };`;
578+
snippet = `${typePrefix}sampler2DArray ${ uniform.name };`;
579579

580580
} else {
581581

0 commit comments

Comments
 (0)