Skip to content

Commit

Permalink
WebGLRenderer: Cleaned ArrayCamera viewport/scissor code.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jun 1, 2017
1 parent 1fa2fd4 commit 8fd10d8
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/renderers/WebGLRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit 8fd10d8

Please sign in to comment.