Got some hot-off-the-compiler WebVR builds for you tonight, but these builds require some explanation and come with a favor request attached. If you want technical details of what's changed in these builds read on, but if you just want to hear my request skip to the bottom.
I've recently been reworking most of how the WebVR distortion rendering happens, essentially moving it much further down the pipeline to happen in the compositior, which is the bit that actually pushes triangles to the screen when everything else is done. This allows us to apply timewarp to the rendering in an attempt to compensate for the still-much-in-need-of-improvement latency. That work is mostly done, though there's a few known issues. The primary problem is that this build doesn't respect custom FOV settings at the moment, but that will be fixed soon.
Now, the weird thing here is that according to Oculus' documentation I should be capturing some timing information about each frame in order for Timewarp to work. I'm not calling the timing methods, however, primarily because WebGL doesn't really have a good concept of when a frame "begins". As such I would expect that the Timewarp call (ovrHmd_GetEyeTimewarpMatrices) would return either fairly inaccurate data or simply garbage. Much to my surprise, however, it actually seems to be giving me pretty much exactly what I need. Case in point, a faked "asynchronous timewarp" test I put together (by only having WebGL render every fifth frame but having the compositor render every frame) was actually quite passable! (See: https://vine.co/v/ObU3tqIITFP
But here's the crazy part: Adding timewarp handling has, on my machines, largely eliminated judder. And no, I'm not sure why. My worry is, though, that this is only the case on my beefy gaming rig (GTX 970) and laptop (Retina MacBook). So I'd like to gather some feedback from developers on how this new build performs for them.TL;DR:
Once you download one of these builds, try this: Using Extended desktop mode set the Rift as your primary display, making sure it's running at 75Hz. (Yes, that sucks, sorry. Working on not requiring those kind of hoops.) Then visit http://media.tojicode.com/q3bsp/
and go into VR mode. Timewarp is on by default. Take a look around and see if the scene is rendering smoothly or not, then press "T" to toggle Timewarp off and on. Feel free to try this build with other WebVR apps as well, timewarp will automatically be applied.
I would LOVE to hear back, in the comments on this post or on Twitter:
* What hardware and OS are you testing on?
* Does this build improve judder for you?
* Do you notice much difference when toggling timewarp off and on?
* Do you see any performance or correctness regressions with other WebVR content?
Thanks in advance for your feedback!
[EDIT: Oh, I forgot to mention that as a minor bonus you can actually run this build in Direct-to-HMD mode if you launch it with the "--single-process" command line flag, but I really don't recommend it. Single process mode is buggy and crashes frequently, and the Chrome will only render at 60Hz so you get weird tearing.]