Input(Pose) alignment with VSYNC on VrShell |
||
Issue descriptionIn VrShellGl::DrawFrame, it will send gesture to content by VrShellGl::SendGestureToContent. But I think this is too late and the "content" here has no chance to generate a compositing frame within current vsync period. This may introduce a frame's latency. I have an overview of this issue here: https://docs.google.com/document/d/11FrQmxVbjVzlOK1TQrVo65pxEOFlFiXIBGtD9IZ2qfQ/edit
,
May 18 2017
Thank you for highlighting this issue, but I think there's a misunderstanding here. WebVR normally uses the Gamepad API for controllers and receives headset poses from VRDisplay, both of these have their own input paths that generally poll controllers at vsync before triggering the Javascript rAF animation callback, and these don't involve SendGestureToContent. SendGestureToContent is used to send events to the DOM. This is the primary input mode for the non-WebVR 2D VR browsing mode where users interact with a content quad floating in space. For WebVR, the only event through this path that matters is the legacy Cardboard emulation click event that's currently sent in addition to the Gamepad API, and we're planning to get rid of that once we have a better solution, see for example issue 718665 . Unless I'm misunderstanding things, I think this is working as intended for WebVR purposes. For 2D browsing, latency is less critical, and the current design ensures the displayed controller model including the pointing laser matches what's used for generating events.
,
May 18 2017
I'll note that currently the 2D content quad isn't even necessarily tied to the VR vsync, and it's totally possible we get 0 or 2 2D content frame updates per VR frame. We'll be trying to improve this in the future, but no concrete plans at the moment. |
||
►
Sign in to add a comment |
||
Comment 1 by amp@chromium.org
, May 18 2017