diff --git a/src/renderers/webxr/WebXRManager.js b/src/renderers/webxr/WebXRManager.js index 804301f5f62025..01a3e5e4b51314 100644 --- a/src/renderers/webxr/WebXRManager.js +++ b/src/renderers/webxr/WebXRManager.js @@ -51,18 +51,14 @@ class WebXRManager extends EventDispatcher { // const cameraL = new PerspectiveCamera(); - cameraL.layers.enable( 1 ); cameraL.viewport = new Vector4(); const cameraR = new PerspectiveCamera(); - cameraR.layers.enable( 2 ); cameraR.viewport = new Vector4(); const cameras = [ cameraL, cameraR ]; const cameraXR = new ArrayCamera(); - cameraXR.layers.enable( 1 ); - cameraXR.layers.enable( 2 ); let _currentDepthNear = null; let _currentDepthFar = null; @@ -572,6 +568,10 @@ class WebXRManager extends EventDispatcher { } + cameraL.layers.mask = camera.layers.mask | 0b010; + cameraR.layers.mask = camera.layers.mask | 0b100; + cameraXR.layers.mask = cameraL.layers.mask | cameraR.layers.mask; + const parent = camera.parent; const cameras = cameraXR.cameras;