OpenXR - Anti-flickering rendering flow added#19361
OpenXR - Anti-flickering rendering flow added#19361hrydgard merged 3 commits intohrydgard:masterfrom lvonasek:feature-openxr-antiflickering
Conversation
|
Can you explain a little bit clearer what this does in detail, and how that prevents flickering? It's not entirely clear to me. That said, this sounds like a good improvement and I'm happy to merge if I understand it :) |
|
Of course. A game renders a frame with camera pose based on user's head pose. When there is a small framedrop OpenXR reprojects an old frame to the new head pose. That works great if the framedrop is small. With games running 30FPS with XR session running 72Hz there are way too much framedrops and due to reprojection inaccuracies user gets flickery frames when moving the head around. With the toggle in this PR, the game renders a frame with the unmodified camera pose. There is modified projection matrix to render bit more of the scene and with aspect ratio 2:1. The user sees a curved stereoscopic cinema around him and it doesn't matter if it runs 12 or 120FPS, there are no reprojections which would cause flickering (except if user activates 6DoF, then the cinema translates as the user translates) |
|
OK! I get it. I'll try to get around to testing it myself soon :) In the meantime, let's get it in. |
Many games do not render at 60FPS. That causes in VR flickering because of the way OpenXR works.
In CitraVR there is an "Immersive mode" which extends the viewport and map it on a cylinder. The advantage of that flow is even on low FPS there is no flickering. The approach has a few glitches in Citra and would have much more glitches in PPSSPP.
This PR got inspired by that idea but instead of extending viewport, I render a custom view and map it on a cylinder. The user can turn the head left-right up to 45° without noticing it isn't real VR.
With this much more games are playable in VR. It works slightly better with 6DoF disabled.
Edit: I made iCameraPitch config as a floating point value. Sorry for putting two things into one PR.