Hi friends,
pretty much every shader I open from nvidia’s website has declaration of standard ‘untweakables’.
For example:
/************* "UN-TWEAKABLES" TRACKED BY CPU APPLICATION **************/
float4x4 AimWorldITXf : WorldInverseTranspose <string UIWidget="None";>;
float4x4 AimWorldXf : World <string UIWidget="None";>;
float4x4 AimViewIXf : ViewInverse <string UIWidget="None";>;
float4x4 AimWorldViewProjXf : WorldViewProjection <string UIWidget="None";>;
float4x4 AimWorldViewITXf : WorldViewInverseTranspose <string UIWidget="None";>;
float4x4 AimWorldViewXf : WorldView <string UIWidget="None";>;
float4x4 AimViewXf : View <string UIWidget="None";>;
float4x4 AimViewITXf : ViewInverseTranspose <string UIWidget="None";>;
Now this looks somewhat intimidating, but it seems to me that you can calculate all these matrices by taking inverse or transpose or combinations of these 3 matrices:
View
World
Projection
So what are these matrices in Unity?
I am going to guess:
View → there isn’t one. You need to supply it from scipt.
World → _Object2World
Projection → UNITY_MATRIX_P
some transformations/combinations of these matrices readily available:
WorldViewProjection → UNITY_MATRIX_MVP
WorldView → UNITY_MATRIX_MV
WorldViewTranspose → UNITY_MATRIX_T_MV
WorldViewInverseTranspose → UNITY_MATRIX_IT_MV
WorldInverse → _World2Object
please correct me if I am wrong.

