I was just playing with HLSL . I want to get the vector "inputPos" in vector "pos". case2 is working but not case1 . why ? Aren't both the cases same ? M * M_Inv * inputPos = inputPos. Why case 1 is not giving right value?
//case 1
pos = mul( float4( inputPos, 1), c_mView ); // Line1
pos = mul ( pos , c_mViewInverse ); // Line2
//case2
pos = mul ( mul( float4( inputPos, 1), c_mView ) , c_mViewInverse );
thanks.