Closed yuyaolong closed 5 months ago
Is the reason: calculate camera transformation in the world coordinate space firstly, inverse that matrix will be like do world coordinate space origin transformation in camera coordinate space
I find it's easier to think of the camera itself as a 3d object. This allows me to treat movement and rotation of the camera the same as any other 3d object. However, when rendering from the camera's point of view from a vertex shader you need the "view transformation" which is the inverse of the "camera transformation". (combined with the projection matrix as well)
Hope this helps.
https://github.com/hyperlogic/splatapult/blob/7b0416a62269c3079aeea90160a25cbbb7f141c6/src/splatrenderer.cpp#L146
:Why we need to do glm::inverse here?