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