diff --git a/src/core/RenderTarget3D.js b/src/core/RenderTarget3D.js index 4d9fcf08d3578e..3449d4b01395a8 100644 --- a/src/core/RenderTarget3D.js +++ b/src/core/RenderTarget3D.js @@ -31,15 +31,19 @@ class RenderTarget3D extends RenderTarget { this.depth = depth; - /** - * Overwritten with a different texture type. - * - * @type {Data3DTexture} - */ - this.texture = new Data3DTexture( null, width, height, depth ); - this._setTextureOptions( options ); + // overwrite attachments with 3D textures + + for ( let i = 0; i < this.textures.length; i ++ ) { - this.texture.isRenderTargetTexture = true; + const texture = new Data3DTexture( null, width, height, depth ); + texture.isRenderTargetTexture = true; + texture.renderTarget = this; + + this.textures[ i ] = texture; + + } + + this._setTextureOptions( options ); }