-
Notifications
You must be signed in to change notification settings - Fork 330
Incorrect FOV conversion (might not affect real programs) #1716
Description
Describe the bug
The FOV conversion at
Revive/Revive/CompositorBase.cpp
Line 481 in 4843c1b
| vr::VRTextureBounds_t CompositorBase::FovPortToTextureBounds(ovrFovPort eyeFov, ovrFovPort fov) |
I believe that the correct calculation is taking the headset-suggested tan bounds and multiplying them by the game's projection matrix. If left tans were negative, then uMin = vrTanAngleLeft * 2 / (gameTanAngleRight - gameTanAngleLeft) - (gameTanAngleRight + gameTanAngleLeft) / (gameTanAngleRight - gameTanAngleLeft)
Even if I'm wrong about what the correct conversion is, the attached demo shows incorrect behavior in Revive.
To Reproduce
Steps to reproduce the behavior:
OculusRoomTiny_GL_modified.zip
- Run program, in Revive and on real Oculus headset
Expected behavior
The 3D view should look almost good, except there's a black area on most of the left of the view
Actual behavior
Weird distortion. The view is pushed excessively to the right, and does not behave properly as the head moves
Environment (please complete the following information):
- App: Modified version of OculusRoomTiny_GL
- OS: Win10
- Headset: Oculus Quest 2
Versions (please complete the following information):
- Revive: 2.1.1
- SteamVR: beta 1.19.7
Additional context
The attached program contains the below code, to force an asymmetric FOV:
hmdDesc.DefaultEyeFov[0].LeftTan = 0.17f;
hmdDesc.DefaultEyeFov[1].LeftTan = 0.17f;

