mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Revert r6496
git-svn-id: https://svn.eduke32.com/eduke32@6523 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
5de5dc9fcd
commit
90045e4ce3
1 changed files with 5 additions and 7 deletions
|
@ -582,10 +582,10 @@ static float get_projhack_ratio(void)
|
||||||
{
|
{
|
||||||
if (glprojectionhacks)
|
if (glprojectionhacks)
|
||||||
{
|
{
|
||||||
// tangent of ((angle of 4 by 3) + (angle of 128 by 199)) / tangent of 90
|
static constexpr float const projhack_zoom = 1.3f;
|
||||||
static constexpr float const projhack_constant = 1.166015625f;
|
static constexpr float const maxcoshoriz = 0.540971179375801f; // 128/sqrt(128^2+199^2) = cos of an horiz diff of 199
|
||||||
float const projhack = 65536.f / fviewingrange;
|
static constexpr float const factor = (projhack_zoom - 1.f) * (1.f / maxcoshoriz);
|
||||||
return projhack_constant > projhack ? projhack_constant : projhack;
|
return 1.f + (factor * (1.f - Bfabsf(gchang)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// No projection hacks (legacy or new-aspect)
|
// No projection hacks (legacy or new-aspect)
|
||||||
|
@ -625,10 +625,8 @@ static void resizeglcheck(void)
|
||||||
const int32_t ourxdimen = (windowxy2.x-windowxy1.x+1);
|
const int32_t ourxdimen = (windowxy2.x-windowxy1.x+1);
|
||||||
float ratio = get_projhack_ratio();
|
float ratio = get_projhack_ratio();
|
||||||
const int32_t fovcorrect = (int32_t)(ourxdimen*ratio - ourxdimen);
|
const int32_t fovcorrect = (int32_t)(ourxdimen*ratio - ourxdimen);
|
||||||
viewingrange = Blrintf(fviewingrange *= ratio);
|
|
||||||
float const halfydimen = fydimen * 0.5f;
|
|
||||||
ratio = 1.f/ratio;
|
ratio = 1.f/ratio;
|
||||||
globalhoriz = ((globalhoriz - halfydimen) * ratio) + halfydimen;
|
|
||||||
|
|
||||||
glox1 = (float)windowxy1.x; gloy1 = (float)windowxy1.y;
|
glox1 = (float)windowxy1.x; gloy1 = (float)windowxy1.y;
|
||||||
glox2 = (float)windowxy2.x; gloy2 = (float)windowxy2.y;
|
glox2 = (float)windowxy2.x; gloy2 = (float)windowxy2.y;
|
||||||
|
|
Loading…
Reference in a new issue