google / marzipano

A 360° media viewer for the modern web.
http://www.marzipano.net
Apache License 2.0
1.98k stars 997 forks source link

WebVR using Oculus GO #254

Open jordyno opened 5 years ago

jordyno commented 5 years ago

Just tested the WebVR demo with Oculus Go 32GB and the image was extremely low resolution. Is this isolated to Oculus browser or do I need to force the stage dimensions somehow?

tjgq commented 5 years ago

Unfortunately I don't have an Oculus, so you'll have to help me debug.

The demo defaults to the highest resolution available, so it can't be a bug in level selection.

The WebGL implementation multiplies the canvas width and height (in CSS pixels) by the devicePixelRatio to determine the resolution to render at. One possibility is that one of these values is incorrectly reported on the Oculus Browser. You can add some logging here to find out. If the values seem off, try multiplying the width and height by a constant to see if it makes any difference.

jordyno commented 5 years ago

Did some debugging, the stage size is 800x451, ratio is 1. This gives the expected resolution of 400x451 per each eye view. It's worth noting that upon opening the demo in the Oculus Browser, a smooth level (preview?) tiles are loaded first. Shortly thereafter next level tiles are loaded which look much worse - they are edgy and lowres. The same low quality tiles appear after entering the VR mode. I also noted some black spots on the sides of the view when turning my head a bit faster - as if there was no underlying preview and tiles are loading a bit too slow. Suspect LRU problem? But this is another issue and might be also because Oculus Go is a low end. Anyway, where do I go from here? One thing is that the Oculus Go Browser is obviously working at a very low resolution (800x451px, 1040x585px fullscreen), which might be the limitation. But it seems that Marzipano adds to this issue by loading tiles with too big resolution, which then the browser is unable to resize and/or render with antialiasing properly and thus gives the edgy look.

Please check out recording from the VR headstet here