Dynamic Resolution#970
Open
bjornbytes wants to merge 3 commits into
Open
Conversation
bjornbytes
commented
Jun 27, 2026
| stencil = false, | ||
| antialias = true, | ||
| supersample = false, | ||
| dynamicResolution = true, |
Owner
Author
|
I don't love the |
Owner
Author
|
Ugh, Meta returns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements dynamic resolution in
lovr.headset, so the render resolution will scale automatically based on performance to help keep the frame rate high/consistent.This uses two different OpenXR extensions:
XR_EXT_view_configuration_views_changeis an event that the runtime sends if the user's preferred rendering resolution changes, like the "render scale" slider in SteamVR settings. LÖVR listens to this event now and resizes the headset texture as the slider moves. (This was a long-standing feature gap between OpenXR and OpenVR).XR_META_recommended_layer_resolutionis "real" dynamic resolution. LÖVR asks the runtime for a recommended resolution every frame, and it scales dynamically with performance.Other notes:
t.headset.dynamicresolution, which defaults to true.t.headset.supersample, although currently I have it so the supersample factor is still applied if neither of the extensions are supported. Maybe it's still useful for the simulator? It would be nice to reduce the amount of moving parts though.lovr.headset.getDisplayDimensionsreturns the dynamic resolution.lovr.headset.updateis called.lovr.headset.getPasshas its viewport/scissor set to the dynamic resolution.lovr.mirrorto render the sub-rectangle of the headset texture.Pass:setQuadcan't come soon enough.Is this worth it? I guess so. It's better than setting
t.headset.supersampleto something arbitrary and hoping for the best.Closes #956