Comments and answers for "Is UNITY_MATRIX_VP wrong under DX11?"
http://answers.unity.com/questions/805761/is-unity-matrix-vp-wrong-under-dx11.html
The latest comments and answers for the question "Is UNITY_MATRIX_VP wrong under DX11?"Answer by fastcoder
http://answers.unity.com/answers/1601210/view.html
I have a similar problem on directx 11, windows 10, unity 2018.2.18f1 . Below vertex shader behaves correctly.
v2f vert(appdata_base v) {
v2f o;
float4 worldFragment =mul(UNITY_MATRIX_M, v.vertex);
o.position = mul(UNITY_MATRIX_VP,worldFragment);
return o;
}
But the following one not
v2f vert(appdata_base v) {
v2f o;
float4 worldFragment =mul(UNITY_MATRIX_MV, v.vertex);
o.position = mul(UNITY_MATRIX_P,worldFragment);
return o;
}
What could be the reason?Wed, 13 Feb 2019 00:23:54 GMTfastcoderAnswer by CHPedersen
http://answers.unity.com/answers/812865/view.html
It turns out the short answer to my question was "yes".
The VP matrix was indeed set wrong under DX11. I was very lucky and got Aras' attention on the forum for this problem, and he was able to check the source code and find a bug that caused the VP matrix to go out of sync under DX11. Interested parties may follow the link to the forum version of this question.
It will be fixed for Unity 5, and hopefully also for the next 4.5x patch. Closing now. :)Mon, 20 Oct 2014 10:44:43 GMTCHPedersen