mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
Polymost: New projection hack algorithm: Keep zoom equivalent to Classic when looking straight ahead.
Patch from Fox. git-svn-id: https://svn.eduke32.com/eduke32@6486 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
d6682d58d3
commit
c746b486b7
1 changed files with 4 additions and 2 deletions
|
@ -522,8 +522,10 @@ static float get_projhack_ratio(void)
|
|||
{
|
||||
if (glprojectionhacks)
|
||||
{
|
||||
float const mul = (gshang * gshang);
|
||||
return 1.05f + mul * mul * mul * mul;
|
||||
static constexpr float const projhack_zoom = 1.3f;
|
||||
static constexpr float const maxcoshoriz = 0.540971179375801f; // 128/sqrt(128^2+199^2) = cos of an horiz diff of 199
|
||||
static constexpr float const factor = (projhack_zoom - 1.f) * (1.f / maxcoshoriz);
|
||||
return 1.f + (factor * (1.f - Bfabsf(gchang)));
|
||||
}
|
||||
|
||||
// No projection hacks (legacy or new-aspect)
|
||||
|
|
Loading…
Reference in a new issue