3
我只是在玩HLSL。我想获得矢量“pos”中的矢量“inputPos”。 case2正在工作,但不是case1。为什么?两种情况都不一样吗? M * M_Inv * inputPos = inputPos。为什么案例1没有给出正确的价值?hlsl矩阵乘法
//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);
谢谢。