Skip to content

Instantly share code, notes, and snippets.

View ssell's full-sized avatar
🐢
🐢🐢🐢🐢🐢

Steven Sell ssell

🐢
🐢🐢🐢🐢🐢
View GitHub Profile
@unitycoder
unitycoder / UNITY_MATRIX_IT_MV.shader
Last active September 11, 2024 05:46
UNITY_MATRIX_IT_MV[] Vectors in Shader
UNITY_MATRIX_IT_MV[0].xyz = ???
UNITY_MATRIX_IT_MV[1].xyz = Camera Up
UNITY_MATRIX_IT_MV[2].xyz = Camera Forward
float3 forward = -normalize(UNITY_MATRIX_V._m20_m21_m22);
cameraFwd = -unity_MatrixInvV._m02_m12_m22;
float3 up = normalize(UNITY_MATRIX_V._m10_m11_m12);
float3 right = normalize(UNITY_MATRIX_V._m00_m01_m02);
float3 cameraUp = unity_CameraInvProjection[1].xyz;