Archive 17/01/2023.

Some test of WebXR

orefkov

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:

  1. 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.
  2. 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

SirNate0

Awesome! What are you using for the WebXR binding? A library like

orefkov

Hi!
Yes, this is the library I used, with minor changes.
Recently, I also updated the SDL2 to the latest version, and in general, Emscripten has its own port for SDL2. I linked it, but on the site the old version is still working, there are problems with sound. Now I’m still finishing the transfer of UI to VR. And then try implement OpenXR, for Win and Android.

orefkov

Slightly updated the version on the site.
Now you can see and test:
04_StaticScene
05_AnimatingScene
06_SkeletalAnimation
08_Decals
18_CharacterDemo
19_VehicleDemo
35_SignedDistanceFieldText
44_RibbonTrailDemo

Input still does not work, you can just look and turn your head.