Skip to content

Commit 8683d96

Browse files
authored
RenderTarget: Fix resize of 3D textures. (#31854)
1 parent 8e2c9b0 commit 8683d96

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/core/RenderTarget.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,16 @@ class RenderTarget extends EventDispatcher {
294294
this.textures[ i ].image.width = width;
295295
this.textures[ i ].image.height = height;
296296
this.textures[ i ].image.depth = depth;
297-
this.textures[ i ].isArrayTexture = this.textures[ i ].image.depth > 1;
297+
298+
if ( this.textures[ i ].isData3DTexture !== true ) { // Fix for #31693
299+
300+
// TODO: Reconsider setting isArrayTexture flag here and in the ctor of Texture.
301+
// Maybe a method `isArrayTexture()` or just a getter could replace a flag since
302+
// both are evaluated on each call?
303+
304+
this.textures[ i ].isArrayTexture = this.textures[ i ].image.depth > 1;
305+
306+
}
298307

299308
}
300309

0 commit comments

Comments
 (0)