فهرست منبع

Fixed missing parameters in the right camera in CrosseyedEffect.

This was making mess with depth material.
alteredq 13 سال پیش
والد
کامیت
cbaaca3543
1فایلهای تغییر یافته به همراه9 افزوده شده و 0 حذف شده
  1. 9 0
      examples/js/effects/CrosseyedEffect.js

+ 9 - 0
examples/js/effects/CrosseyedEffect.js

@@ -33,6 +33,8 @@ THREE.CrosseyedEffect = function ( renderer ) {
 
 	this.render = function ( scene, camera ) {
 
+		// left
+
 		_cameraL.fov = camera.fov;
 		_cameraL.aspect = 0.5 * camera.aspect;
 		_cameraL.near = camera.near;
@@ -44,6 +46,11 @@ THREE.CrosseyedEffect = function ( renderer ) {
 		_cameraL.translateX( this.separation );
 		_cameraL.lookAt( _cameraL.target );
 
+		// right
+
+		_cameraR.near = camera.near;
+		_cameraR.far = camera.far;
+
 		_cameraR.projectionMatrix = _cameraL.projectionMatrix;
 
 		_cameraR.position.copy( camera.position );
@@ -51,6 +58,8 @@ THREE.CrosseyedEffect = function ( renderer ) {
 		_cameraR.translateX( - this.separation );
 		_cameraR.lookAt( _cameraR.target );
 
+		//
+
 		renderer.clear();
 
 		renderer.setViewport( 0, 0, _width, _height );