diff --git a/src/renderers/WebGLRenderer.js b/src/renderers/WebGLRenderer.js index fb5f443c68c3ce..0d7162aa869475 100644 --- a/src/renderers/WebGLRenderer.js +++ b/src/renderers/WebGLRenderer.js @@ -436,14 +436,14 @@ function WebGLRenderer( parameters ) { this.setViewport = function ( x, y, width, height ) { - _viewport.set( x, y, width, height ) + _viewport.set( x, _height - y - height, width, height ) state.viewport( _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ) ); }; this.setScissor = function ( x, y, width, height ) { - _scissor.set( x, y, width, height ) + _scissor.set( x, _height - y - height, width, height ) state.scissor( _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ) ); }; @@ -1082,7 +1082,7 @@ function WebGLRenderer( parameters ) { // Rendering this.render = function ( scene, camera, renderTarget, forceClear ) { - + if ( ! ( camera && camera.isCamera ) ) { console.error( 'THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.' );