Re: Error in stereo.conf

Brian Paul <[email protected]> Tue, 09 May 2006 09:36:10 -0600
Newsgroups gmane.comp.graphics.chromium.devel
Message-ID <[email protected]>
Michael Dürig wrote:
> 
> Regarding the stereo*.conf files which come along with Chromium I think 
> there is an error in the calculation of the viewing frustum.
> Shouldn't it be
> 
> # Projection matrix
> p = crmatrix.CRMatrix()
> if eye == 0:
>   left = s * ((halfWidth * -aspect) + EyeSep);
>   right = s * ((halfWidth * aspect) + EyeSep);
> else:
>   left = s * (halfWidth * -aspect - EyeSep);
>   right = s * (halfWidth * aspect - EyeSep);
> 
> instead of
> 
> # Projection matrix
> p = crmatrix.CRMatrix()
> if eye == 0:
>   left = s * ((halfWidth * -aspect) - EyeSep);
>   right = s * ((halfWidth * aspect) - EyeSep);
> else:
>   left = s * (halfWidth * -aspect + EyeSep);
>   right = s * (halfWidth * aspect + EyeSep);
> 
> 
> For the left eye the scene is shifted to the right by EyeSep. This 
> results in a right shift of the corresponding near plane by s*EyeSep.
> 
> I verified the above in our CAVE environment by displaying a vertical 
> line exactly at the focal distance. Moving the line back and forth along 
> the z-axis it will always display in negative parallax in the first 
> case. In the second case however it will correctly display in 
> negative/positive parallax depending on the z-coordinate being behind/in 
> front of the focal distance.

That sounds right.  I've checked in your changes.

-Brian


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642