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
- Verify active asset and camera depth settings.
Testing and writing are separate settings - Request depth in custom passes and sample after it becomes available, using XR-compatible sampling.
Testing and writing are separate settings - Linearize for the required units; account for reversed Z, projection, and missing transparents.
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
- Verify depth settings on the active asset and intended Game camera.
Testing and writing are separate settings - Compare raw, normalized and eye-depth interpretations; custom passes also need inputs and timing.
Testing and writing are separate settings - Restore the calculation and required projection, transparent and XR cases.
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
- Depth Texture
- Depth Buffer (Depth Buffer / Z Buffer)
- Soft particles: fade intersections using consistent depths