As you say, keeps the same fov, I don't want that. I want to see the same screen. I am terrible explaining with english. Wait I am going to make images
.
D.mode(1024,768) [1.333f]
D.viewFov(DegToRad(63.8f),FOV_Y);
D.mode(1280,720) [1.7777f]
D.viewFov(DegToRad(63.8f),FOV_Y);
I dont want to see parts inside red rectangles, then my function gives the correct FOV_Y:
D.mode(1024,768) [1.333f]
D.viewFov(AutoFov(63.8f,FOV_Y),FOV_Y);
D.mode(1280,720) [1.7777f]
D.viewFov(AutoFov(63.8f,FOV_Y),FOV_Y);
I know you can do the same with D.viewFov(DegToRad(someValue),
FOV_X). My function is the inverse of that. Ie :
FOV_Y keeps the same horizontal fov (for all resolutions), but calculates vertical fov to match the horizontal one.
FOV_X keeps the same vertical fov (for all resolutions), but calculates horizontal fov to match the vertical one.
Which is the reason of this? Because in Esenthel editor you can change only the FOV_Y in advanced video options, but what if you want to see the same horizontal and you only have that value? When I add a new scene to my project this is useful for me, I just wanted to share it.