Skip to main content

Interface: OcclusionSource

Defined in: webxr-environment/src/occlusion.ts:50

How the app would like the depth sensor configured.

Every field is a PREFERENCE. A host that cannot pass it on reports occlusion as active anyway and says what it ignored, because a refused preference is not a broken feature.

Properties

PropertyModifierTypeDescriptionDefined in
depthType?readonly"raw" | "smooth"smooth is temporally filtered; raw is what the sensor said.webxr-environment/src/occlusion.ts:59
format?readonly"float32" | "luminance-alpha" | "unsigned-short"-webxr-environment/src/occlusion.ts:57
matchDepthView?readonlybooleanAsk for depth captured from the same view as the render. When false, a consumer has to sample through normDepthBufferFromNormView itself.webxr-environment/src/occlusion.ts:64
usage?readonly"cpu-optimized" | "gpu-optimized"gpu-optimized hands back a texture, which is what a depth-priming pass needs and what three.js's built-in path requires. cpu-optimized hands back an array, which is what hit-testing against depth needs.webxr-environment/src/occlusion.ts:56