← All resources

Depth (Cyanilux)

Auto-discovered

Blog Advanced

Cyanilux

Visit resource ↗

Description

Depth is a long Cyanilux blog post (updated 2025) on how Unity represents fragment distance from the camera, mainly in Universal RP with HDRP notes. It covers Shader Graph and URP HLSL side by side.

Sections explain eye depth, NDC and z-buffer depth, non-linear precision, depth buffer versus the copied depth texture, ZWrite and ZTest, SV_Depth, the Scene Depth node, depth difference, and world-position reconstruction for perspective and orthographic cameras.

It targets advanced Unity shader authors who already use URP or HDRP queues and can read generated HLSL or Frame Debugger output.

One free page with a section index, diagrams, and snippets; no account required.

Useful alongside official URP depth docs for naming and edge cases. Cyanilux tutorials are widely linked in Unity shader communities as practical companions to official documentation.