Depth Texture
Depth Texture algorithmically estimates the depth of a Camera Input Texture.

Import Depth Texture
- Go to the Assets panel
- Click the Add asset button [+]
- Go to Texture
- Click Depth Texture

How Depth Texture Works
Depth Texture adds algorithmically-predicted depth to your effect. The Depth Texture asset is a black and white texture, where the resulting grayscale texture predicts a real-world object’s distance from the camera. For example, the darker the texture, the closer it is to the camera.

tip
Try using Depth Texture in Material Editor to achieve different results!
Demo
Start by downloading the following demo project:

In this demo project, the R (red) values of Depth Texture is pulled to apply a blue strip between two estimated points. The darker the texture, or the lower the R value, the closer to the camera the blue strip will appear.
