diff --git a/source/core/rendering/render.cpp b/source/core/rendering/render.cpp index f5795d1b6..f23437e54 100644 --- a/source/core/rendering/render.cpp +++ b/source/core/rendering/render.cpp @@ -108,8 +108,6 @@ struct FBunch angle_t endangle; }; -const float aspect_factor = (1.28f / 1.333333f); // this factor gets applied by the original code - must check if needed or just an artifact of the weird math. - // ---------------------------------------------------------------------------- // // Bunches are groups of continuous lines @@ -617,8 +615,6 @@ static void SetProjection(const FRotator& rotation, FAngle fov) { fovratio = ratio; } - ratio *= aspect_factor; // this factor gets applied by the original code - must check if needed or just an artifact of the weird math. - fovratio *= aspect_factor; auto rotmat = eye.GetProjection(fov.Degrees, ratio, fovratio); renderSetProjectionMatrix(rotmat.get()); } @@ -626,7 +622,7 @@ static void SetProjection(const FRotator& rotation, FAngle fov) static void SetViewMatrix(const FRotator& angles, float vx, float vy, float vz, bool mirror, bool planemirror) { float mult = mirror ? -1.f : 1.f; - float planemult = planemirror ? -aspect_factor : aspect_factor;// Level->info->pixelstretch : Level->info->pixelstretch; + float planemult = planemirror ? -1.f : 1.f;// Level->info->pixelstretch : Level->info->pixelstretch; VSMatrix mViewMatrix; mViewMatrix.loadIdentity(); diff --git a/source/core/rendering/scene/hw_walls.cpp b/source/core/rendering/scene/hw_walls.cpp index 98e4fc4be..74fe83c7f 100644 --- a/source/core/rendering/scene/hw_walls.cpp +++ b/source/core/rendering/scene/hw_walls.cpp @@ -784,7 +784,7 @@ void HWWall::DoTexture(HWDrawInfo* di, walltype* wal, walltype* refwall, float r auto setv = [=](float hl, float hr, float frac) -> float { float h = hl + (hr - hl) * frac; - h = ((float)(refheight - (h * 256)) / ((th * 2048.0f) / (float)(wal->yrepeat))) + ypanning; + h = (-(float)(refheight + (h * 256)) / ((th * 2048.0f) / (float)(wal->yrepeat))) + ypanning; if (wal->cstat & CSTAT_WALL_YFLIP) h = 1.f - h; return h; };