mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
- Re-calculate the sector for each eye if it has a shift factor applied.
This commit is contained in:
parent
ede52f2dde
commit
f8035bb4ba
1 changed files with 10 additions and 3 deletions
|
@ -154,10 +154,17 @@ void RenderViewpoint(FRenderViewpoint& mainvp, IntRect* bounds, float fov, float
|
||||||
|
|
||||||
// Stereo mode specific perspective projection
|
// Stereo mode specific perspective projection
|
||||||
di->VPUniforms.mProjectionMatrix = eye.GetProjection(fov, ratio, fovratio);
|
di->VPUniforms.mProjectionMatrix = eye.GetProjection(fov, ratio, fovratio);
|
||||||
// Stereo mode specific viewpoint adjustment
|
|
||||||
vp.Pos += eye.GetViewShift(vp.HWAngles.Yaw.Degrees());
|
|
||||||
di->SetupView(RenderState, vp.Pos.X, vp.Pos.Y, vp.Pos.Z, false, false);
|
|
||||||
|
|
||||||
|
// Stereo mode specific viewpoint adjustment
|
||||||
|
if (eye.mShiftFactor != 0)
|
||||||
|
{
|
||||||
|
vp.Pos += eye.GetViewShift(vp.HWAngles.Yaw.Degrees());
|
||||||
|
sectortype* sect = §or[vp.SectCount];
|
||||||
|
updatesector(DVector2(vp.Pos.X, -vp.Pos.Y), §);
|
||||||
|
vp.SectCount = sectindex(sect);
|
||||||
|
}
|
||||||
|
|
||||||
|
di->SetupView(RenderState, vp.Pos.X, vp.Pos.Y, vp.Pos.Z, false, false);
|
||||||
di->ProcessScene(toscreen);
|
di->ProcessScene(toscreen);
|
||||||
|
|
||||||
if (mainview)
|
if (mainview)
|
||||||
|
|
Loading…
Reference in a new issue