From 49af4a4b35380af93b5f9e54b3b5a91d9bb80539 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Tue, 10 Dec 2019 00:44:40 +0100 Subject: [PATCH] - fix line backside textures mirrored --- src/rendering/swrenderer/line/r_wallsetup.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rendering/swrenderer/line/r_wallsetup.cpp b/src/rendering/swrenderer/line/r_wallsetup.cpp index 0f26308f18..8dbef53009 100644 --- a/src/rendering/swrenderer/line/r_wallsetup.cpp +++ b/src/rendering/swrenderer/line/r_wallsetup.cpp @@ -140,6 +140,12 @@ namespace swrenderer t2 = (lineseg->v2->fY() - line->v1->fY()) / line->delta.Y; } + if (line->sidedef[0] != lineseg->sidedef) + { + t1 = 1.0f - t1; + t2 = 1.0f - t2; + } + tx1 = t1 + tx1 * (t2 - t1); tx2 = t1 + tx2 * (t2 - t1); }