Hello. I made a somewhat similar inquiry a few days ago. But I’m currently trying to patch Unity games for stereo 3D support. I need to account for changes in FOV and I’m not sure how to extract the FOV information from the projection matrix. I really don’t know much about coding. I’m currently using a custom wrapper to dump & edit the vertex & pixel shaders (in ASM).
Thanks in advance.
I use the unity_CameraProjection matrix to calculate the FOV in shader.
Here is the formula:
float t = unity_CameraProjection._m11;
const float Rad2Deg = 180 / UNITY_PI;
float fov = atan(1.0f / t ) * 2.0 * Rad2Deg;
If you want to calculate in C#, check out the link here.