mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-24 13:11:30 +00:00
fix code cleanup
This commit is contained in:
parent
a7417a4bde
commit
5e108751f2
1 changed files with 10 additions and 7 deletions
|
@ -513,19 +513,22 @@ R_SetupProjection
|
||||||
void R_SetupProjection(viewParms_t *dest, float zProj, qboolean computeFrustum)
|
void R_SetupProjection(viewParms_t *dest, float zProj, qboolean computeFrustum)
|
||||||
{
|
{
|
||||||
float xmin, xmax, ymin, ymax;
|
float xmin, xmax, ymin, ymax;
|
||||||
float width, height, stereoSep;
|
float width, height, stereoSep = r_stereoSeparation->value;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* offset the view origin of the viewer for stereo rendering
|
* offset the view origin of the viewer for stereo rendering
|
||||||
* by setting the projection matrix appropriately.
|
* by setting the projection matrix appropriately.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(dest->stereoFrame == STEREO_LEFT)
|
if(stereoSep != 0)
|
||||||
stereoSep = zProj / r_stereoSeparation->value;
|
{
|
||||||
else if(dest->stereoFrame == STEREO_RIGHT)
|
if(dest->stereoFrame == STEREO_LEFT)
|
||||||
stereoSep = zProj / -r_stereoSeparation->value;
|
stereoSep = zProj / stereoSep;
|
||||||
else
|
else if(dest->stereoFrame == STEREO_RIGHT)
|
||||||
stereoSep = 0;
|
stereoSep = zProj / stereoSep;
|
||||||
|
else
|
||||||
|
stereoSep = 0;
|
||||||
|
}
|
||||||
|
|
||||||
ymax = zProj * tan(dest->fovY * M_PI / 360.0f);
|
ymax = zProj * tan(dest->fovY * M_PI / 360.0f);
|
||||||
ymin = -ymax;
|
ymin = -ymax;
|
||||||
|
|
Loading…
Reference in a new issue