提交 433d0fe2 编写于 作者: M Mr.doob

Reverting ArrayCamera WebGLRenderer changes. Viewport gets squashed after entering/leaving VR.

上级 bb485afe
...@@ -1233,6 +1233,12 @@ function WebGLRenderer( parameters ) { ...@@ -1233,6 +1233,12 @@ function WebGLRenderer( parameters ) {
state.buffers.depth.setMask( true ); state.buffers.depth.setMask( true );
state.buffers.color.setMask( true ); state.buffers.color.setMask( true );
if ( camera.isArrayCamera && camera.enabled ) {
_this.setScissorTest( false );
}
camera.onAfterRender( _this ); camera.onAfterRender( _this );
// _gl.finish(); // _gl.finish();
...@@ -1410,19 +1416,15 @@ function WebGLRenderer( parameters ) { ...@@ -1410,19 +1416,15 @@ function WebGLRenderer( parameters ) {
var camera2 = cameras[ j ]; var camera2 = cameras[ j ];
var bounds = camera2.bounds; var bounds = camera2.bounds;
_currentViewport.set( _this.setViewport(
bounds.x * _width, bounds.y * _height, bounds.x * _width * _pixelRatio, bounds.y * _height * _pixelRatio,
bounds.z * _width, bounds.w * _height bounds.z * _width * _pixelRatio, bounds.w * _height * _pixelRatio
).multiplyScalar( _pixelRatio ); );
_this.setScissor(
_currentScissor.set( bounds.x * _width * _pixelRatio, bounds.y * _height * _pixelRatio,
bounds.x * _width, bounds.y * _height, bounds.z * _width * _pixelRatio, bounds.w * _height * _pixelRatio
bounds.z * _width, bounds.w * _height );
).multiplyScalar( _pixelRatio ); _this.setScissorTest( true );
state.viewport( _currentViewport );
state.scissor( _currentScissor );
state.setScissorTest( true );
renderObject( object, scene, camera2, geometry, material, group ); renderObject( object, scene, camera2, geometry, material, group );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册