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:
hendricks266 2017-10-16 03:32:37 +00:00
parent d6682d58d3
commit c746b486b7

View file

@ -522,8 +522,10 @@ static float get_projhack_ratio(void)
{ {
if (glprojectionhacks) if (glprojectionhacks)
{ {
float const mul = (gshang * gshang); static constexpr float const projhack_zoom = 1.3f;
return 1.05f + mul * mul * mul * mul; 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) // No projection hacks (legacy or new-aspect)