Explorar o código

restore viewport correctly (#9747)

Jaume Sanchez %!s(int64=8) %!d(string=hai) anos
pai
achega
a6dfcc6806
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      examples/js/effects/VREffect.js

+ 2 - 1
examples/js/effects/VREffect.js

@@ -311,7 +311,7 @@ THREE.VREffect = function ( renderer, onError ) {
 				cameraL.projectionMatrix = fovToProjection( eyeParamsL.fieldOfView, true, camera.near, camera.far );
 				cameraR.projectionMatrix = fovToProjection( eyeParamsR.fieldOfView, true, camera.near, camera.far );
 
-				
+
 			}
 
 			// render left eye
@@ -351,6 +351,7 @@ THREE.VREffect = function ( renderer, onError ) {
 
 			} else {
 
+				renderer.setViewport( 0, 0, size.width, size.height );
 				renderer.setScissorTest( false );
 
 			}