Depth Render Texture
Depth Render Texture enables the retrieval of a camera’s depth stencil buffer, allowing users to obtain depth cache information from the current scene. This information helps create depth-based interactions, such as collision detection and depth-dependent visual effects. The darker the rendered depth color, the closer the object is to the camera.

How Depth Render Texture Works
The following are key points for the integration of Depth Render Texture:
- Depth Render Texture: allows capturing depth information within the scene from a 3D camera
- Depth information is represented in grayscale:
- Darker areas indicate objects that are closer to the camera
- Lighter areas indicate objects that are farther from the camera
- Enables the creation of depth-based special effects and gameplay mechanics
Depth Render Texture Usage
Depth Render Texture can be used in the Camera component to display depth visuals
It can be applied as a texture in a material graph and visual effects graph
Can be dragged into the Visual Scripting panel for advanced interactions
Depth Texture vs. Depth Render Texture
- Depth Render Texture: Captures real-time depth data from the camera and renders it as a texture, Provides real-time depth relations in a scene, offering more dynamic interactions
- Depth Texture: Uses a precomputed depth detection algorithm to estimate object depth
Add Depth Render Texture
To add Depth Render Texture:
- Go to the Assets Panel
- Click the Add button [+]
- Go to Texture
- Select Depth Render Texture
The texture appears in the Render Textures folder of the Assets panel.

Apply Depth Render Texture to an Object
Select an object with a Camera component in the Hierarchy panel
Locate the Camera component in the Inspector panel
Click the Depth Render Texture field
Select an available Depth Render Texture asset in the asset picker
The camera will now output depth information as a grayscale texture.