When scaling with animation, incorrect shading is applied.
This is because the normal vectors are multiplied by the transformation matrix as is.
To get the proper shading, it should be multiplied by the adjoint-transposed transformation matrix.
The attached video shows a cube model that rotated and then scaled. Due to this bug, the shading is wrong. This world is also attached.
Side surface: small change in tilt, but large change in brightness
Top and bottom surfaces: large change in tilt, but small change in brightness
Attachments
Comments 1

[media][media]