Skip to main content
Version: 4.0.0

Depth Texture

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

depth texture demo

Import Depth Texture

  1. Go to the Assets panel
  2. Click the Add asset button [+]
  3. Go to Texture
  4. Click Depth Texture
add 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.

depth texture preview
tip

Try using Depth Texture in Material Editor to achieve different results!

Demo

Start by downloading the following demo project:

DepthTexture_Demo.zip

depth texture demo

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.

demo subgrah