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