Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/core/RenderTarget.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,6 @@ class RenderTarget extends EventDispatcher {
*/
this.viewport = new Vector4( 0, 0, width, height );

const image = { width: width, height: height, depth: options.depth };

const texture = new Texture( image );

/**
* An array of textures. Each color attachment is represented as a separate texture.
* Has at least a single entry for the default color attachment.
Expand All @@ -136,6 +132,9 @@ class RenderTarget extends EventDispatcher {
*/
this.textures = [];

const image = { width: width, height: height, depth: options.depth };
const texture = new Texture( image );

const count = options.count;
for ( let i = 0; i < count; i ++ ) {

Expand Down