diff --git a/src/renderers/WebGLRenderer.js b/src/renderers/WebGLRenderer.js index dd70caba52e215..c15c288bd946b7 100644 --- a/src/renderers/WebGLRenderer.js +++ b/src/renderers/WebGLRenderer.js @@ -1935,6 +1935,9 @@ function WebGLRenderer( parameters = {} ) { _currentActiveMipmapLevel = activeMipmapLevel; let useDefaultFramebuffer = true; + let framebuffer = null; + let isCube = false; + let isRenderTarget3D = false; if ( renderTarget ) { @@ -1957,14 +1960,6 @@ function WebGLRenderer( parameters = {} ) { } - } - - let framebuffer = null; - let isCube = false; - let isRenderTarget3D = false; - - if ( renderTarget ) { - const texture = renderTarget.texture; if ( texture.isData3DTexture || texture.isDataArrayTexture || texture.isCompressedArrayTexture ) {