-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
[WebXR] Add support for getting and setting display refresh rate #72938
Conversation
fde261a
to
33bac1f
Compare
Looks like a good start! Did you find out if WebXR has the same issue as the Quest native where it defaults to Quest 1s 72hz refresh rate but reports 90hz? |
9ceb6c5
to
b82e0c1
Compare
I've finally had a chance to test this, and it basically works! However, it's a little counter-intuitive. It'll report a refresh rate of So, probably the right way to use it, is to call Because it's asynchronous, I've added a signal ( For this same reason, I'm thinking about removing the
I guess not, because it always reports |
This is roughly on par with the OpenXR experience - In the frame-rate control (GodotVR/godot-xr-tools#364) we handled the odd behavior. I figure we'll extend the same file to handle refresh rate for WebXR in exactly the same way:
For OpenXR/Quest we get the oddity of it reporting 90hz while running at 72hz; so if the user doesn't request a desired rate we pick 90hz (closest to the bogus 90 reported). Given the rules above, for WebXR/Quest if the user doesn't request a desired rate we would end up picking 72Hz (closest to the bogus 0 reported). |
Hm, the lowest it reports supporting is 60, so if it's going to grab the lowest one, it would end up on 60 which isn't ideal. In any case, that's not something we need to solve here :-) |
b82e0c1
to
886f227
Compare
I've removed the At this point, this functionality is working and ready for review, so I'm taking it out of draft! |
Now that we're past the 4.0 stable release, this PR's time has come! :-) @BastiaanOlij @m4gr3d @Malcolmnixon Can one of you review this PR when you have a chance? Thanks! |
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.
This looks good to me, and testing showed it works fine on my Quest 2 in WebXR.
Thanks! |
This is currently a draft because it's completely untested - I just whipped it up because @Malcolmnixon asked about it :-)This is fully working and tested now!
Also, this in NOT essential for 4.0 at all, it can wait until later :-)