Skip to content
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

Implement XR_META_recommended_layer_resolution extension #226

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

devloglogan
Copy link
Collaborator

@devloglogan devloglogan commented Nov 18, 2024

Adds an extension wrapper implementation of XR_META_recommended_layer_resolution.

The extension can be enabled via project settings. When enabled, the extension will dynamically update the rendered image resolutions at a resolution of less or equal size to the initial swapchain size. I've primarily tested this just by spawning enough cube mushes in the demo project until FPS starts taking a hit, at which point the runtime will typically begin recommending lower resolutions as more cubes are added.

This PR relies on godotengine/godot#99407, so I'll keep it as a draft until those changes are merged.

@dsnopek
Copy link
Collaborator

dsnopek commented Nov 18, 2024

I did some testing with this on Quest 3, and saw really great performance gains!

In my rendering benchmarking project, it gathers some metrics at 3 different "markers" in the scene, one of which usually drops down to 55fps (from the target 72fps which all the other markers reach). However, when running it with this extension enabled, it keeps a steady 72fps (at the cost of visibly losing resolution, but it's not terrible). I added some print statements and I can see it scaling the resolution down at that marker, and then scaling it back up at the next.

This is really cool! :-)

The code in the PR looks good to me as well.

@devloglogan devloglogan force-pushed the fb-recommended-resolution branch from c18a456 to d4bf10c Compare November 18, 2024 22:36
Copy link
Collaborator

@m4gr3d m4gr3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@devloglogan devloglogan force-pushed the fb-recommended-resolution branch from d4bf10c to 46739c7 Compare November 19, 2024 19:31
@devloglogan devloglogan marked this pull request as ready for review January 15, 2025 16:00
@devloglogan
Copy link
Collaborator Author

Opening this since godotengine/godot#99407 was merged :)

@devloglogan devloglogan changed the title [DRAFT] Implement XR_META_recommended_layer_resolution extension Implement XR_META_recommended_layer_resolution extension Jan 15, 2025
@dsnopek
Copy link
Collaborator

dsnopek commented Jan 21, 2025

@devloglogan Could you rebase on master? You'll need to get rid of your changes to extension_api.json to clear up the conflicts. And I suspect this will pass tests due to other changes on master too

@devloglogan devloglogan force-pushed the fb-recommended-resolution branch from 46739c7 to a3813d4 Compare January 21, 2025 18:09
@devloglogan
Copy link
Collaborator Author

@dsnopek rebased :)

Copy link
Collaborator

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I just tested the latest version of this on Meta Quest 3 with my rendering benchmarking project, and it's working great with Godot 4.4-beta1! With recommended layer resolution turned on, I'm still seeing a steady 72 FPS (at the cost of visibly lower resolution) when going to the marker that usually has 55-60 FPS.

@dsnopek dsnopek merged commit 417fc91 into GodotVR:master Jan 21, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants