FOV scales ortho up to 180 degrees

One line change in r_utility.cpp affecting a custom field.

Orthographic projection sees "more" of the sceen as fov increases, but only up to 180 degrees, after which it will have no effect.
Orthographic projection has no meaning for fov since there is no Frustum. But since this is fundamental to the engine, I am reinterpreting it. Cherno wanted this too.
I'll update the wiki if this gets in.
This commit is contained in:
dileepvr 2024-10-15 21:29:21 -06:00 committed by Rachael Alexanderson
parent 48b23bdfae
commit ee16e47b11
No known key found for this signature in database
GPG key ID: 26A8ACCE97115EE0

View file

@ -704,7 +704,7 @@ void FRenderViewpoint::SetViewAngle(const FViewWindow& viewWindow)
HWAngles.Yaw = FAngle::fromDeg(270.0 - Angles.Yaw.Degrees());
if (IsOrtho() && (camera->ViewPos->Offset.XY().Length() > 0.0))
ScreenProj = 1.34396 / camera->ViewPos->Offset.Length(); // [DVR] Estimated. +/-1 should be top/bottom of screen.
ScreenProj = 1.34396 / camera->ViewPos->Offset.Length() / tan (FieldOfView.Radians()*0.5); // [DVR] Estimated. +/-1 should be top/bottom of screen.
}