Luxar draws everything on three's default layer 0: the main camera, the pick pass,
the environment CubeCamera and the blend warm-up's compile objects all assume it,
and nothing persistent lives anywhere else. The two other bits are used TRANSIENTLY —
set and restored inside a single render call, so no other camera can ever observe
them — by the refraction split (post-processing/post-processing-manager/ refraction-split.ts), which needs to draw refract_data glass in its own pass and
to keep the meshes three's own materials draw out of the data-in-front pass. Keep it
that way: a mesh parked on a non-default layer between frames would vanish from every
other pass at once.
The two transient bits sit at the TOP of three's 32-layer range, clear of layers 1
and 2: those are the eye layers three's WebXR manager enables on its left and right
eye cameras, so an object on layer 1 or 2 during an XR frame would draw in one eye
only.
The viewer's
Object3D.layersbits.Luxar draws everything on three's default layer 0: the main camera, the pick pass, the environment
CubeCameraand the blend warm-up's compile objects all assume it, and nothing persistent lives anywhere else. The two other bits are used TRANSIENTLY — set and restored inside a single render call, so no other camera can ever observe them — by the refraction split (post-processing/post-processing-manager/ refraction-split.ts), which needs to drawrefract_dataglass in its own pass and to keep the meshes three's own materials draw out of the data-in-front pass. Keep it that way: a mesh parked on a non-default layer between frames would vanish from every other pass at once.The two transient bits sit at the TOP of three's 32-layer range, clear of layers 1 and 2: those are the eye layers three's WebXR manager enables on its left and right eye cameras, so an object on layer 1 or 2 during an XR frame would draw in one eye only.