Created
July 29, 2015 11:22
-
-
Save sugi-cho/2dc916b11740456ff988 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void vert(inout appdata_full v){ | |
half4 worldPos = mul(_Object2World, v.vertex); | |
half4 viewPos = mul(UNITY_MATRIX_V, worldPos); | |
half4 eyePos = mul(UNITY_MATRIX_P, viewPos); | |
viewPos = mul(unity_CameraInvProjection, eyePos); | |
half4 localPos = mul(viewPos, UNITY_MATRIX_IT_MV); | |
v.vertex = localPos; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment