Removing pre-clipping of Frustum if pitch > 46 degrees and viewpoint is not allowed out of bounds. This is like old behavior.

This commit is contained in:
Dileep V. Reddy 2024-09-30 07:58:43 -06:00 committed by Rachael Alexanderson
parent 18c068fd1f
commit 568a39d203

View file

@ -366,6 +366,7 @@ angle_t HWDrawInfo::FrustumAngle()
{ {
// If pitch is larger than this you can look all around at an FOV of 90 degrees // If pitch is larger than this you can look all around at an FOV of 90 degrees
if (fabs(Viewpoint.HWAngles.Pitch.Degrees()) > 89.0) return 0xffffffff; if (fabs(Viewpoint.HWAngles.Pitch.Degrees()) > 89.0) return 0xffffffff;
else if (fabs(Viewpoint.HWAngles.Pitch.Degrees()) > 46.0 && !Viewpoint.IsAllowedOoB()) return 0xffffffff; // Just like 4.12.2 and older did
int aspMult = AspectMultiplier(r_viewwindow.WidescreenRatio); // 48 == square window int aspMult = AspectMultiplier(r_viewwindow.WidescreenRatio); // 48 == square window
double absPitch = fabs(Viewpoint.HWAngles.Pitch.Degrees()); double absPitch = fabs(Viewpoint.HWAngles.Pitch.Degrees());
// Smaller aspect ratios still clip too much. Need a better solution // Smaller aspect ratios still clip too much. Need a better solution