I am investigating native video layers for Quest headsets in WebXR. There is two examples but not sure which method to use. I have a group of controls meshes that is overlayed on top so not sure how to add that into a layer unless it goes to a baselayer from the scene.
This method uses the native equi layer that is updated on the render state.
This uses a quad layer method for video but its for 360 stereo video
Is this the correct method for video which is the background layer
const mediaBinding = new XRMediaBinding( session );
const equirectLayer = mediaBinding.createEquirectLayer(
video,
{
space: refSpace,
layout: 'stereo-left-right',
// Rotate by 45 deg to avoid stereo conflict with the 3D geometry.
transform: new XRRigidTransform(
{},
{ x: 0, y: .28, z: 0, w: .96 }
)
}
);
If so how do I switch from a video texture mesh to the layer. Remove the mesh from the scene in a webxr session ?
regarding my group with buttons to control. Does this need to go into a special layer somehow also or stay added to the scene its ok ? Its a bunch of meshes added to a single group.
I modified the example with a native video layer but yet to get a headset to check it works. the layers polyfill doesn’t work with video layers. So the layers on the mesh need to be disabled when going to xr sessions.