Occlusion
ARCore provides support for occlusion based on environment depth images it generates every frame. These depth images provide a distance (in meters) from the device to any part of the environment in the camera field of view.
Supported textures
The ARCore implementation of AR Foundation Occlusion supports AROcclusionManager.environmentDepthTexture but does not support the other Textures related to human segmentation.
Environment depth
The XROcclusionSubsystem provides access to two types of environment depth: raw and smoothed.
- Raw: The raw, unsmoothed depth data. This is useful for custom processing where raw data is necessary and corresponds to ARCore's ArFrame_acquireRawDepthImage16Bits function.
- Smoothed: Depth data with smoothing applied. This is useful when performing occlusion and corresponds to ARCore's ArFrame_acquireDepthImage16Bits function.
Note
Both raw and smoothed are always available if depth is supported, regardless of the value of environmentDepthTemporalSmoothingEnabled.
Requirements
Environment depth requires a device with depth support. See ARCore supported devices for a list of devices that support depth ("Supports Depth API" in the Comments column).