Sign in to follow this  
Leafteaner

transpose matrix question

Recommended Posts

While working on deferred shading i noticed i get identical results when multiplying a 3x3 transpose tanget matrix by the 3D normal vector as when I multiply the 3D normal vector with the original tangent matrix. I'm not 100% sure but i think a transpose matrix has the rows and columns swapped. Are these two operations identical? Here's what I mean in pseudo code: float3x3 matTan; // Tangent matrix (3x3 matrix) float3x3 matTrans; // Transpose of the tangent matrix (3x3 matrix) float3 normal; // Pixel normal (3 dimensional vector) normal*matTan == matTrans*normal ??

Share this post


Link to post
Share on other sites
yuppers.

Semantically, normal*matTan treats normal as a row-vector, whereas matTrans*normal treats it as a column-vector, but they do the same set of operations.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this