Interpolate Shadows when Scaling Mobjs
When a mobj is scaling up or down, the mobj's scale is interpolated smoothly, but its shadow's scale is uninterpolated. This is because that a shadow is rendered with the mobj's radius
(not scale
!) multiplied by its shadowscale
, neither of which are interpolated as radius
"doesn't" relate to rendering and shadowscale
is usually set as an instant change (e.g. setting it to 0 when bopping enemies). (Scaling a mobj changes it's radius
proportionately.)
This can be fixed in two ways:
- Interpolate a mobj's radius
when rendering, and make functions to either "set" or "interpolate" changes to radius
.
- Multiply a shadow's scale by the proportion between its mobj's interpolated scale
and uninterpolated scale
.
This merge request opts for the latter.
This merge request does not interpolate mobjs' shadowscale
; changing shadowscale
is still instant. It's only the shadow's natural scaling from changing a mobj's scale
that gets interpolated.
-
TL;DR: Fixed an interpolation artefact