From: Brian P. <bri...@tu...> - 2006-05-09 15:36:18
|
Michael D=FCrig wrote: >=20 > Regarding the stereo*.conf files which come along with Chromium I think= =20 > there is an error in the calculation of the viewing frustum. > Shouldn't it be >=20 > # Projection matrix > p =3D crmatrix.CRMatrix() > if eye =3D=3D 0: > left =3D s * ((halfWidth * -aspect) + EyeSep); > right =3D s * ((halfWidth * aspect) + EyeSep); > else: > left =3D s * (halfWidth * -aspect - EyeSep); > right =3D s * (halfWidth * aspect - EyeSep); >=20 > instead of >=20 > # Projection matrix > p =3D crmatrix.CRMatrix() > if eye =3D=3D 0: > left =3D s * ((halfWidth * -aspect) - EyeSep); > right =3D s * ((halfWidth * aspect) - EyeSep); > else: > left =3D s * (halfWidth * -aspect + EyeSep); > right =3D s * (halfWidth * aspect + EyeSep); >=20 >=20 > For the left eye the scene is shifted to the right by EyeSep. This=20 > results in a right shift of the corresponding near plane by s*EyeSep. >=20 > I verified the above in our CAVE environment by displaying a vertical=20 > line exactly at the focal distance. Moving the line back and forth alon= g=20 > the z-axis it will always display in negative parallax in the first=20 > case. In the second case however it will correctly display in=20 > negative/positive parallax depending on the z-coordinate being behind/i= n=20 > front of the focal distance. That sounds right. I've checked in your changes. -Brian |