From c6f19904954c34a23913ec431ca39fb28b024fd8 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 20 Oct 2024 08:36:35 +0200 Subject: [PATCH] SW: fix shadow size math. --- source/games/sw/src/draw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index ff226ddd66..541796b4da 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -347,8 +347,8 @@ void DoShadows(tspriteArray& tsprites, tspritetype* tsp, double viewz) ground_dist = int(abs(loz - GetSpriteZOfBottom(tsp)) * (1./16)); double scaleofs = (ground_dist - view_dist) * REPEAT_SCALE; - scale.X = clamp(scale.X + scaleofs, 0.0625, 4.); - scale.Y = clamp(scale.Y + scaleofs, 0.0625, 4.); + scale.X = clamp(scale.X - scaleofs, 0.0625, 4.); + scale.Y = clamp(scale.Y - scaleofs, 0.0625, 4.); tSpr->scale = scale; if (tilehasmodelorvoxel(tsp->spritetexture(), tsp->pal))