Three.js: Support "OCULUS_multiview" WebGL extension

Created on 17 Sep 2020  路  5Comments  路  Source: mrdoob/three.js

Three.js supports the "OVR_multiview2" WebGL2 extension, which is enabled by default in some browsers. However that extension only works on non-anti-aliased contexts, which results in a very rough image. Further, the Oculus browser only supports it behind a flag.

Oculus has implemented their own version of the extension in the Oculus browser ("OCULUS_multiview"), and it supports multi-sample anti-aliasing as well. It appears Three.js doesn't support this one though.

Details and an example implementation is available here: https://developer.oculus.com/documentation/oculus-browser/browser-multiview/

It seems like this is a huge performance win for Three.js users, while still supporting anti-aliasing unlike Firefox Reality and other browsers. A quote from the page above:

Often, a CPU usage reduction of 25% - 50% is possible.

Is there any interest in implementing support for this Oculus specific, but very useful extension?

Enhancement

Most helpful comment

@mrdoob
Yeah, OCULUS_multiview is enabled by default (it can be disabled via chrome://flags though, for debugging purposes). You can see an example of it usage here: https://artyom17.github.io/webxr-samples/multi-layer-mv.html (source: https://github.com/Artyom17/webxr-samples/blob/master/multi-layer-mv.html).
There is intent to propose the extension to WebGL WG, however, there are several drawbacks at the moment which will delay the acceptance of the extension. And, of course, it will have a different name. But I can't provide any ETA for that.

All 5 comments

Yes! That'd be great. Is OCULUS_multiview enabled by default?

We used to support OVR_multiview2 but I decided to remove the code because the lack of antialias support.

@mrdoob Yes, according to the Oculus Developer site, OCULUS_multiview is enabled by default in the Oculus Browser 馃檪

@mrdoob
Yeah, OCULUS_multiview is enabled by default (it can be disabled via chrome://flags though, for debugging purposes). You can see an example of it usage here: https://artyom17.github.io/webxr-samples/multi-layer-mv.html (source: https://github.com/Artyom17/webxr-samples/blob/master/multi-layer-mv.html).
There is intent to propose the extension to WebGL WG, however, there are several drawbacks at the moment which will delay the acceptance of the extension. And, of course, it will have a different name. But I can't provide any ETA for that.

Thanks @Artyom17!

I'm open for it 馃憤

Very cool, glad to hear this! Also, I hadn't realized you removed the OVR_multiview2 support, but that makes sense - things look pretty rough in-headset with no AA. Looking forward to seeing these great features combined and working via the new extension 馃榾

Was this page helpful?
0 / 5 - 0 ratings