我刚刚在玩HLSL。我想要将向量“inputPos”转换到向量“pos”中。case2可以正常工作,但是case1不能。为什么?这两个案例不一样吗? M * M_Inv * inputPos = inputPos。为什么case1没有给出正确的值?
//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 );
谢谢。