Is there a constant for the FOV?

Hello. I’m trying to mod a Unity game for stereo 3D support (Nvidia 3D Vision) and I’m using a custom wrapper to dump and edit shaders (in ASM).

When stereo-izing a pixelshader, I’m trying to account for FOV. I’ve been using a fixed value, but in many games, the FOV changes from scene to scene. Is there a constant or variable that contains the FOV information that I can use? Or does the FOV constant vary from game to game? If it varies, is there another way I can find out what the FOV variable is?

Side question: With Unity engine games, no header information seems to be included in any of the Vertex or Pixel shaders. Is there any other way to retrieve the header information?

Thank you in advance.

No, there isn’t. The fov information exists inside the projection matrix. I’m not sure what header information you actually talk about :wink: The shaders are included in abuild in compiled form. Unity provides various high-level ways to write shaders. Unity uses ShaderLab as the highest level and you can include CG or GLSL code inside a shader.