I’m working on a webxr application that was running into performance issues in VR mode.
These links lead me to enable multiview which has increased FPS by a lot. However the documentation uses a deprecated way of enabling it. (const xrscene.createDefaultVRExperience({useMultiview:true}))
Is there an easy way to enable it using the webxrexperiencehelper instead?
multi-views in webxr are rendered using the layers feature, which is only available in one browser (namely - the oculus browser, AFAIK). WebXR doesn’t support the kind of multiview in this docs (though I will be the first one to admit - it is not written in those docs and it should be there!).
To enable multiview you will need to enable the layers feature. The layres feature has a flag that will automatically move you to multi-view if it is available:
And now I remember why I haven’t fully documented this yet. The WebXR layers feature is still behind a flag in chrome://flags. you will need to enable it (and set the oculus extension for multiview) to get the playground working.
@RaananW Thanks for the help! But I’m facing another issue if you could guide me a bit.
Using Multiview with the WebXR layers feature doesn’t seem to be helping, in fact makes the view very very glitchy, and the FPS stays the same compared to not having multiview on.(20-30 FPS)
This is how it is with multiview on using the layers feature.
I assume this is an import issue. You are using the BABYLON namespace in an npm-based project. Are you importing the entire namespace, or importing individual modules? If so you will need to import the WebXRFeatureName module and use it without the babylon namespace. same goes to the WebXRLayers feature.
Not sure how you tested WebVR (as it is deprecated and was removed from all browsers except firefox), but I have never experienced any serious issues with the layers’ multiview. The only issue that always needs to be addressed in multisampling, that is only supported using the OCULUS extension (and not the default chrome extension). Would you be able to share a reproduction of this so we can analyze it?
The meta quest browser has a ‘webgl multiview extension’ under chrome://flags and it has 4 options
default
oculus multiview and ovr multiview 2
ovr multiview 2
disabled
Hope you have reffered to this same flag
I have tried with 2 and 3 options both but the fps seems to remain the same. Is there a debug log or something to test that if its actually on and working.