-
Notifications
You must be signed in to change notification settings - Fork 377
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
Predicted Display/Vsync Timestamp #1211
Comments
It's primarily been concerns about making sure that whatever value we surface is: a) universal and b) useful. I think the latter is the larger sticking point. Syncing the headset-provided numbers up with the values that you can get today in JavaScript may be difficult, and ensuring developers recognize what those numbers actually mean is tricky. For example, it would be really easy to look at a That said, I have no qualms about adding such a value if we can demonstrate a clear way for developers to effectively utilize it. |
This value is definitely used in native code to provide smooth animations. |
Definitely agree. I hope that developers are roughly aware that quite a bit of (uncertain amounts of) time is required between submit and vsync.
Smooth animations, as pointed out by @rcabanier, or smoother physics updates are the most important use case here. This timestamp gives "the point in time at which the frame will be shown", ergo, the time at which animations should be. I wonder if Is there something I can do to move this forward? E.g. sketch out a possible example for immersive-web-samples? |
If you make a proposal, the oculus browser could ship it as an experimental API. |
In OpenXR, there is an explicitly separate notion of "time" and "system time":
I encourage any XR time representation we use here to allow for that same decoupling of the frame time for the XR display from the time on the host running the UA and its JavaScript threads. We could then consider further APIs to convert those XR times to/from other web time domains (e.g. that match
I would consider not using |
I think that's really all we can do here. If author choose to abuse this API, there's not much we can do about it... |
@Squareys if you want to discuss this during a meeting you can tag this issue with /agenda |
/agenda To discuss this at the next meeting @Squareys would you be willing to drive the discussion for this? @AdaRoseCannon can send you an invite for the meeting. Otherwise I guess Rik or Brandon can drive this. |
There has been discussion about what the timestamp passed to various callbacks should represent (#347 and #943) from which the consensus was to keep it consistent with the window rAF--as the predicted display/vsync time would be better communicated through the frame. (
XRFrame.timing.predictedDisplayTime
, for example)@blairmacintyre last pinged on this issue, but the issue has since been closed, half resolved with only the consistent rAF part.
Though, neither the timestamp passed to the rAF, nor
performance.now()
are useful for the app to produce smooth animations, here's an attempt at explaining this:Vsync on the web, if I understand correctly, has been a headache for web games and graphics developers for quite some time now (w3c/html#785), there even are tools to measure how this is still not working well (https://www.vsynctester.com/), and I believe for WebXR it's probablye even more important to get this right, as the jutter is so much more perceivable on VR headsets.
CC @cabanier
The text was updated successfully, but these errors were encountered: