OQ2 webGL/webXR layers basic usage

Now we have WebXR Layers support. Thank you ! Dixit Oculus doc, textures are more accurates, this is cool ! I’m looking around a webXR code structure/organization (focused on the OQ2)

Imagine a multiplayer FPS game (mouse+keyboard support AND OQ2), a la pavlovvr ++.

Does it make sens to “think layers”, like this ? Perhaps i’m missing something and we can not use layers like that ?

  • layer 0: scene meshes
  • layer 1: reserved (rendering)
  • layer 2: reserved (rendering)
  • layer 3: weapon & controllers (may be 2 different layers)
  • layer 4: contextual objects (menus, bullets fast animation, may be 2 different layers)
  • layer 5: raytracer + bvh ?

Does the code should have a kind of layer manager to handle switches in layers if needed, depending of the session (XR or keyboard+mouse - no layers ) ? technicaly possible ? overkill ?

Does it make sens to tend to try to use webworkers “by layers” ? with webworkers contraints, of course.

Any kind of feedback appreciated :wink:

Does it make sens to use blender custom attributes to store layer number which are exported into a gltf file and setting it when traversing childs scene ?

Does webgl layers has something to do with webxr layers ?

I missed something.

Object3D.layers is unrelated to WebXR. Or do you mean a different layers property?

WebXR Layers would be in reference to this: WebXR - Layers Samples