Closed RTSBoomIsComing closed 1 year ago
It is correct to multiply the entire tangent frame by the inverse transpose of the world matrix. This includes normal, tangent, and bitangent. In the event that the world matrix is orthogonal, the result will be the same using World instead of WorldIT. The world matrix is usually orthogonal, but skew or (more likely) scale could be involved.
https://github.com/microsoft/DirectX-Graphics-Samples/blob/a79e01c4c39e6d40f4b078688ff95814d166d34f/MiniEngine/Model/Shaders/DefaultVS.hlsl#L118
I know that a normal vector would be multiplied by the worldIT matrix, but a tangent vector would be multiplied by the world matrix.
Is it also okay to multiply it with the worldIT matrix?