-
Notifications
You must be signed in to change notification settings - Fork 220
OVR submit layers to TimeWarp even frames are discarded. #2322
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The screen turns black so it breaks the timewarp. We should try to find a way to detect the exit without breaking the TimeWarp effect
I've tried to reuse the last swapChain and it works but the TimeWarp is not correct either. |
Sorry for my unclear comment. This PR is in order to resolve the problem we can’t exit the immersive mode by getting button states when we get stuck at the content side. The actual fix for this demo is supporting Gamepad haptic feedbacks (#2198). |
4a6c650
to
61965f2
Compare
Yes, the problem is that it breaks the TimeWarp effect. In master if there is a long delay the user sees the last frame Timewarped, but with this change it sees a black screen. |
61965f2
to
c183b17
Compare
I guess submitting layers with the previous frame index and predictedDisplayTime is what we want. After that, I can see it shows the last frame before the JS crash. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have created this sample for testing in Oculus Browser too: https://mortimergoro.github.io/webvr_long_pause/
We should achieve the same behaviour that Oculus Browser does:
- The last used frame is Timewarped (is not black and it doesn't follow the head position)
- Exit from WebVR works
I found a way to get the desired behavior, PR here: #2341 |
The more correct fix is available at #2341 now. |
Fixes #2320. We will get a discard state [1] when WebVR immersive mode is stuck at the content side. That makes us can't continue to get newest controller states until calling
vrapi_SubmitFrame2
.[1]
FirefoxReality/app/src/main/cpp/BrowserWorld.cpp
Line 1412 in 9727203