Skip to content

Commit

Permalink
SW: fix shadow size math.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Oct 20, 2024
1 parent e48911d commit c6f1990
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/games/sw/src/draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit c6f1990

Please sign in to comment.