Figure: Diagnostic workflow: Enable required depth → Sample when available → Match depth units
Figure: Diagnostic workflow: Enable required depth → Sample when available → Match depth units

Cause and mechanism

A Depth Texture records how far surfaces are from the camera. If a depth-based effect such as shoreline foam or intersection fading is missing, check whether the texture is generated. URP settings, camera overrides, read timing, and the objects that write depth must all match the effect's requirements.

Check and correct the setup

  1. Verify active asset and camera depth settings.
    Testing and writing are separate settings
    Testing and writing are separate settings
  2. Request depth in custom passes and sample after it becomes available, using XR-compatible sampling.
    Testing and writing are separate settings
    Testing and writing are separate settings
  3. Linearize for the required units; account for reversed Z, projection, and missing transparents.
    Testing and writing are separate settings
    Testing and writing are separate settings

Limits and verification

Opaque Texture is not depth. Visualize known near/far surfaces to verify values.

A focused diagnostic setup

Visualize Scene Depth in grayscale using a nearby cube and distant opaque wall before restoring the effect.

Test in this order

  1. Verify depth settings on the active asset and intended Game camera.
    Testing and writing are separate settings
    Testing and writing are separate settings
  2. Compare raw, normalized and eye-depth interpretations; custom passes also need inputs and timing.
    Testing and writing are separate settings
    Testing and writing are separate settings
  3. Restore the calculation and required projection, transparent and XR cases.
    Testing and writing are separate settings
    Testing and writing are separate settings

Interpret the result

Correct input with incorrect output suggests units/spaces. Missing geometry in the input suggests depth participation, camera scope or timing.

Related explanations

References