From 54eee347a65ab0f4f8f3791775b2240420178ef0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 2 Apr 2021 22:50:53 +0200 Subject: [PATCH] - do y-flipping of wall textures correctly. 1.f - h is not correct for NPOT texures due to hpw they tile. --- source/core/rendering/scene/hw_walls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/rendering/scene/hw_walls.cpp b/source/core/rendering/scene/hw_walls.cpp index 8b35a6965..7b0805410 100644 --- a/source/core/rendering/scene/hw_walls.cpp +++ b/source/core/rendering/scene/hw_walls.cpp @@ -743,7 +743,7 @@ void HWWall::DoTexture(HWDrawInfo* di, walltype* wal, walltype* refwall, float r { float h = hl + (hr - hl) * frac; h = (-(float)(refheight + (h * 256)) / ((th * 2048.0f) / (float)(wal->yrepeat))) + ypanning; - if (wal->cstat & CSTAT_WALL_YFLIP) h = 1.f - h; + if (wal->cstat & CSTAT_WALL_YFLIP) h = -h; return h; };