API

Interface IWebXRDepthSensingOptions

Options for Depth Sensing feature

interface IWebXRDepthSensingOptions {
    dataFormatPreference: WebXRDepthDataFormat[];
    disableDepthSensingOnMaterials?: boolean;
    prepareTextureForVisualization?: boolean;
    usagePreference: WebXRDepthUsage[];
    useToleranceFactorForDepthSensing?: boolean;
}
Index
dataFormatPreference: WebXRDepthDataFormat[]

The desired depth sensing data format for the session

disableDepthSensingOnMaterials?: boolean

Depth sensing will be enabled on all materials per default, if the GPU variant is enabled. If you just want to use the texture or the CPU variant instead set this to true.

prepareTextureForVisualization?: boolean

If set to true the texture will be set to be used for visualization. In this case it will probably NOT work correctly on the materials. So be aware that, for the time being, you can only use one or the other.

usagePreference: WebXRDepthUsage[]

The desired depth sensing usage for the session

useToleranceFactorForDepthSensing?: boolean

If set to true the occluded pixels will not be discarded but the pixel color will be changed based on the occlusion factor Enabling this will lead to worse performance but slightly better outcome. It is possible we will change this in the future to look even better.