I have an object under the scale transformation <1,2,1>. The shape and location of the object is correct, but lighting is not. Specifically, the diffuse shading of the object appears to move when the camera rotates. When the scale is changed to <1,1,1> this does not occur.

I am doing the following in my code:

- Transform ray by inverse matrix of the transformation
- Test intersection
- Transform intersection point by transformation (return to world coordinates)
- Transform surface normal by inverse matrix
- Light as normal


The lighting model works fine, and the shape of the object is correct. The matrix math is fine. As near as I can tell, the problem is with the surface normal, but I can't figure out what the problem IS. Any insight would be greatly appreciated!