Initially I thought it just means that the last column is simply discarded, but apparently I am getting differing results when I do such conversion as contrasted with just declaring a 3x2 matrix.
float3x3 TBN = float3x3(IN.tangent, IN.binormal, IN.normal);
float3x2 TB = float3x2(IN.tangent, IN.binormal);
half2 vNormalTBN = mul(sampledNormal, (float3x2)TBN);
half2 vNormalTB = mul(sampledNormal, TB);
I'm absolutely no shader expert so this is just a very wild guess and might be completely wrong! ^^
Afaik the components in the matrix are layed out column wise (vertically) and look somewhat like
and is memory wise simply stored as 9 floats in this order.
So similar when you explicitely use the
float3x2
constructor you get something likeWhen however you simply typecast I suspect that you simply cut off the last 3 float values and force the shader to interpret this now 6 floats array as a new
float3x2
matrix which now might look like