Skip to main content
Version: 5.x
Supported on
Snapchat
Camera Kit

World Depth Texture

World Depth Texture in Lens Studio allows you to capture depth for all visible surfaces in the real world. This is useful for creating effects that react to any surface, enabling realistic occlusion and building AR experiences that interact with the user’s environment.

Getting started with the World Depth Texture

To use the World Depth Texture, add a World Depth Texture asset in the Asset Browser panel.

Occlude objects using the World Depth Texture

Use the World Depth Texture with a virtual scene to get occlusions with the real-world environments.

Select the camera object to which you want to apply the depth occlusions in the Scene Hierarchy panel.

Set the Depth Clear Option to Custom Texture. Choose the World Depth Texture as the input for the Custom Texture.

The calculation for this occlusion will be handled by the camera and the World Depth Texture. To see the occlusion in action, add a mesh and place it at a position close to real-world surfaces in your preview.

Was this page helpful?
Yes
No