|
@@ -1767,7 +1767,7 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
};
|
|
|
|
|
|
- this.setRenderTarget = function ( renderTarget, activeCubeFace, activeMipmapLevel ) {
|
|
|
+ this.setRenderTarget = function ( renderTarget, activeCubeFace = 0, activeMipmapLevel = 0 ) {
|
|
|
|
|
|
_currentRenderTarget = renderTarget;
|
|
|
_currentActiveCubeFace = activeCubeFace;
|
|
@@ -1788,7 +1788,7 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
if ( renderTarget.isWebGLCubeRenderTarget ) {
|
|
|
|
|
|
- framebuffer = __webglFramebuffer[ activeCubeFace || 0 ];
|
|
|
+ framebuffer = __webglFramebuffer[ activeCubeFace ];
|
|
|
isCube = true;
|
|
|
|
|
|
} else if ( renderTarget.isWebGLMultisampleRenderTarget ) {
|
|
@@ -1827,7 +1827,7 @@ function WebGLRenderer( parameters ) {
|
|
|
if ( isCube ) {
|
|
|
|
|
|
const textureProperties = properties.get( renderTarget.texture );
|
|
|
- _gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + ( activeCubeFace || 0 ), textureProperties.__webglTexture, activeMipmapLevel || 0 );
|
|
|
+ _gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + activeCubeFace, textureProperties.__webglTexture, activeMipmapLevel );
|
|
|
|
|
|
}
|
|
|
|