浏览代码

Added missing left projection matrix

Luca Siciliano 12 年之前
父节点
当前提交
1fe5d52bac
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      examples/js/effects/OculusRiftEffect.js

+ 3 - 1
examples/js/effects/OculusRiftEffect.js

@@ -155,6 +155,8 @@ THREE.OculusRiftEffect = function ( renderer, options ) {
 		// Render left
 		// Render left
 		this.preLeftRender();
 		this.preLeftRender();
 
 
+		pCamera.projectionMatrix.copy(left.proj);
+
 		pCamera.matrix.copy(camera.matrix).multiply(left.tranform);
 		pCamera.matrix.copy(camera.matrix).multiply(left.tranform);
 		pCamera.matrixWorldNeedsUpdate = true;
 		pCamera.matrixWorldNeedsUpdate = true;
 
 
@@ -168,7 +170,7 @@ THREE.OculusRiftEffect = function ( renderer, options ) {
 		// Render right
 		// Render right
 		this.preRightRender();
 		this.preRightRender();
 
 
-		pCamera.projectionMatrix.copy(right.proj);		
+		pCamera.projectionMatrix.copy(right.proj);
 
 
 		pCamera.matrix.copy(camera.matrix).multiply(right.tranform);
 		pCamera.matrix.copy(camera.matrix).multiply(right.tranform);
 		pCamera.matrixWorldNeedsUpdate = true;
 		pCamera.matrixWorldNeedsUpdate = true;