Browse Source

Revert 7662fe98a48f7948f3aeb2ee2c95c14b158f7206 (oops)

Garrett Johnson 2 years ago
parent
commit
82bd9a35dc
1 changed files with 2 additions and 20 deletions
  1. 2 20
      src/renderers/WebGLRenderer.js

+ 2 - 20
src/renderers/WebGLRenderer.js

@@ -462,16 +462,7 @@ function WebGLRenderer( parameters = {} ) {
 
 
 		}
 		}
 
 
-		_currentViewport.copy( _viewport )
-
-		// pixel ratio only applies to the canvas
-		if ( _currentRenderTarget === null ) {
-
-			_currentViewport.multiplyScalar( _pixelRatio );
-
-		}
-
-		state.viewport( _currentViewport.floor() );
+		state.viewport( _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).floor() );
 
 
 	};
 	};
 
 
@@ -493,16 +484,7 @@ function WebGLRenderer( parameters = {} ) {
 
 
 		}
 		}
 
 
-		_currentScissor.copy( _scissor );
-
-		// pixel ratio only applies to the canvas
-		if ( _currentRenderTarget === null ) {
-
-			_currentScissor.multiplyScalar( _pixelRatio );
-
-		}
-
-		state.scissor( _currentScissor.floor() );
+		state.scissor( _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).floor() );
 
 
 	};
 	};