What is UNITY_MATRIX_VP?

I need the UNITY_MATRIX_VP matrix, that’s defined in shaders, as a Matrix4x4 in a script. How can I find it?

I tried to calculate it using camera.projectionMatrix * camera.worldToCameraMatrix, but that is not it.

1 Like

I use

GL.GetGPUProjectionMatrix(camera.projectionMatrix, true) * camera.worldToCameraMatrix
1 Like

Perfect, works like a charm. Thank you :slight_smile: