// Enable depth sensing with automatic occlusion scene.setEnvironmentDepthMode(EnvironmentDepthMode.OCCLUSION) // Enable depth sensing without occlusion (texture only) scene.setEnvironmentDepthMode(EnvironmentDepthMode.TEXTURE_ONLY) // Disable depth sensing scene.setEnvironmentDepthMode(EnvironmentDepthMode.OFF)
enum EnvironmentDepthMode : Enum<EnvironmentDepthMode>
| Member | Description |
|---|---|
OFF |
Environment depth is disabled.
No depth sensing is performed. This is the default state and uses the least resources.
|
OCCLUSION |
Environment depth is enabled with automatic occlusion.
Virtual objects are automatically occluded by physical surfaces in the environment. The depth texture is also available globally in custom shaders for advanced effects.
This is the traditional mode that provides both depth data and automatic occlusion.
|
TEXTURE_ONLY |
Environment depth is enabled for texture access only, without automatic occlusion.
The depth texture is made available globally in custom shaders, but virtual objects are NOT automatically occluded by the environment. This mode gives you full control over how to use depth data in your shaders.
Use this mode when you want to implement custom depth-based effects like:
|
index
: Int
[Get] |
The internal ID used to identify this mode in native code
Signature
val index: Int |