Skip to content

Commit c6f1990

Browse files
committed
SW: fix shadow size math.
1 parent e48911d commit c6f1990

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/games/sw/src/draw.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,8 @@ void DoShadows(tspriteArray& tsprites, tspritetype* tsp, double viewz)
347347
ground_dist = int(abs(loz - GetSpriteZOfBottom(tsp)) * (1./16));
348348

349349
double scaleofs = (ground_dist - view_dist) * REPEAT_SCALE;
350-
scale.X = clamp(scale.X + scaleofs, 0.0625, 4.);
351-
scale.Y = clamp(scale.Y + scaleofs, 0.0625, 4.);
350+
scale.X = clamp(scale.X - scaleofs, 0.0625, 4.);
351+
scale.Y = clamp(scale.Y - scaleofs, 0.0625, 4.);
352352
tSpr->scale = scale;
353353

354354
if (tilehasmodelorvoxel(tsp->spritetexture(), tsp->pal))

0 commit comments

Comments
 (0)