transpose matrix question

Started by
0 comments, last by ajas95 18 years, 10 months ago
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 ??
Advertisement
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.

This topic is closed to new replies.

Advertisement