- Home /
what the difference between model_View_Matrix and Model_Matrix
as written here http://docs.unity3d.com/Documentation/Components/SL-BuiltinValues.html
float4x4 UNITY_MATRIX_MV Current model*view matrix
float4x4 _Object2World Current model matrix
my question seems a basic one in OpenGL but I am new and not sure where to find the difference an extensive explained reference will be appreciated
Cheers :)
Answer by whydoidoit · Mar 25, 2013 at 09:51 AM
So:
UNITY_MATRIX_MV Convert the model to the view - as in the Camera is at 0,0,0
UNITY_MATRIX_MVP Convert the model to the projection - including the Camera clip planes, field of view etc
_Object2World Convert the model to the World coordinates - the model vertices are in local coordinates, afterward the position multiplied is in world coordinates
UNITY_MATRIX_IT_MV Inverse of the MV matrix - used to convert normals (directions) to the view
Check out the Noobs Guide To Shaders on Unity Gems. That has links to a lot of reference works I found too.
If it works out for you, don't forget to tick the answer :D
Your answer