diff --git a/src/renderers/WebGLRenderer.js b/src/renderers/WebGLRenderer.js index 469fab41173b6c..e3c18e9fa1cf99 100644 --- a/src/renderers/WebGLRenderer.js +++ b/src/renderers/WebGLRenderer.js @@ -1456,14 +1456,13 @@ function WebGLRenderer( parameters ) { var camera2 = cameras[ j ]; var bounds = camera2.bounds; - _this.setViewport( - bounds.x * _width * _pixelRatio, bounds.y * _height * _pixelRatio, - bounds.z * _width * _pixelRatio, bounds.w * _height * _pixelRatio - ); - _this.setScissor( - bounds.x * _width * _pixelRatio, bounds.y * _height * _pixelRatio, - bounds.z * _width * _pixelRatio, bounds.w * _height * _pixelRatio - ); + var x = bounds.x * _width * _pixelRatio; + var y = bounds.y * _height * _pixelRatio; + var width = bounds.z * _width * _pixelRatio; + var height = bounds.w * _height * _pixelRatio; + + _this.setViewport( x, y, width, height ); + _this.setScissor( x, y, width, height ); _this.setScissorTest( true ); renderObject( object, scene, camera2, geometry, material, group );