-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect FOV conversion (might not affect real programs) #1716
Comments
Have you tried testing that demo on the latest beta version of ReviveXR? The OpenVR version is mostly deprecated and all development should focus on the OpenXR version which offers superior compatibility. You'll have to build from source though, since the last development binary was deleted due to inactivity. |
Just tried testing the most recent build from https://ci.appveyor.com/project/librevr/revive/build/artifacts, it closed immediately when I tried. |
It looks like we'll be on OpenVR a while longer anyway. To check if your calculations are correct I'd recommend running Lucky's Tale on your modified build, if you have it. That game uses a symmetric field of view which is the main reason for these calculations. |
A little late, but I have figured out the correct math:
|
Describe the bug
The FOV conversion at
Revive/Revive/CompositorBase.cpp
Line 481 in 4843c1b
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
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):
Versions (please complete the following information):
Additional context
The attached program contains the below code, to force an asymmetric FOV:
Screenshot of Oculus headset:
![image](https://user-images.githubusercontent.com/251161/130535733-48af6785-06f7-49f0-b345-1495e4938bca.png)
Screenshot of Revive:
![image](https://user-images.githubusercontent.com/251161/130535816-5068d6d5-6203-40c9-bc3f-262afaee9edf.png)
The text was updated successfully, but these errors were encountered: