- reverting pull request #2361 - apparently pull request #2364 changed some behaviour and these two do not play nice together. One or the other unfortunately has to be rolled back to allow GZDoom to build properly again.

Revert "Restored r_orthographic behavior."

This reverts commit 26908f5bc5.

Revert "Changed all of the isometric functionality to mapinfo and playerinfo variables. Retained function of most of the CVars."

This reverts commit dc897eacc0.

Revert "Adding isometric camera mode with orthographic projection to current state of master branch of GZDoom."

This reverts commit d2c2c93cf1.
This commit is contained in:
Rachael Alexanderson 2024-01-21 08:17:09 -05:00
commit af08413e10
No known key found for this signature in database
GPG key ID: 26A8ACCE97115EE0
17 changed files with 5 additions and 186 deletions

View file

@ -54,11 +54,3 @@ EXTERN_CVAR(Int, gl_shadowmap_filter)
EXTERN_CVAR(Bool, gl_brightfog)
EXTERN_CVAR(Bool, gl_lightadditivesurfaces)
EXTERN_CVAR(Bool, gl_notexturefill)
EXTERN_CVAR(Bool, r_isocam)
EXTERN_CVAR(Int, r_isoviewpoint)
EXTERN_CVAR(Float, r_iso_camdist)
EXTERN_CVAR(Float, r_iso_dist)
EXTERN_CVAR(Float, r_iso_pitch)
EXTERN_CVAR(Bool, r_drawplayersprites)
EXTERN_CVAR(Bool, r_orthographic)

View file

@ -146,27 +146,11 @@ float VREyeInfo::getShift() const
return vr_swap_eyes ? -res : res;
}
VSMatrix VREyeInfo::GetProjection(float fov, float aspectRatio, float fovRatio, bool iso_ortho) const
VSMatrix VREyeInfo::GetProjection(float fov, float aspectRatio, float fovRatio) const
{
VSMatrix result;
if (iso_ortho) // Orthographic projection for isometric viewpoint
{
double zNear = -1.0; // screen->GetZNear();
double zFar = screen->GetZFar();
double fH = tan(DEG2RAD(fov) / 2) / fovRatio;
double fW = fH * aspectRatio * mScaleFactor;
double left = -fW;
double right = fW;
double bottom = -fH;
double top = fH;
VSMatrix fmat(1);
fmat.ortho((float)left, (float)right, (float)bottom, (float)top, (float)zNear, (float)zFar);
return fmat;
}
else if (mShiftFactor == 0)
if (mShiftFactor == 0)
{
float fovy = (float)(2 * RAD2DEG(atan(tan(DEG2RAD(fov) / 2) / fovRatio)));
result.perspective(fovy, aspectRatio, screen->GetZNear(), screen->GetZFar());

View file

@ -27,7 +27,7 @@ struct VREyeInfo
float mShiftFactor;
float mScaleFactor;
VSMatrix GetProjection(float fov, float aspectRatio, float fovRatio, bool iso_ortho) const;
VSMatrix GetProjection(float fov, float aspectRatio, float fovRatio) const;
DVector3 GetViewShift(float yaw) const;
private:
float getShift() const;