Hi!
I’m doing the implementation of work with VR.
To begin with, I try implement WebXR. A little more has been done, but the rendering seems to be working. Supports two rendering methods:
- The scene is rendered twice, two renderings are made in turn from different cameras into two separate viewports, for the second viewport, the cull camera is set to the camera from the first, to reduce duplication of work on rendering preparation.
- If GL_OVR_multiview2 is supported (Oculus, Chrome), rendering is done in one pass, into a two-layer texture array, and a separate camera is set for each of the layers.
Here is a short video - a recording from the oculus quest 2 browser.
Or you can try it yourself - VR worked so far for scene 06_SkeletalAnimation.as