← All resources

keijiro GitHub - DepthInverseProjection

Auto-discovered

Library / Codebase Intermediate

keijiro

Visit resource ↗

Description

DepthInverseProjection is a public-domain Unity GitHub sample by Keijiro Takahashi that inverse-projects camera depth texels into view or world space through a small post effect.

The shader samples _CameraDepthTexture, rebuilds perspective or orthographic rays with unity_CameraInvProjection, handles reversed-Z, and can map to world space via the inverse view matrix. A grid overlay colors pixels by reconstructed coordinates to catch matrix or depth-scale mistakes.

It targets intermediate Unity shader authors using the legacy Post Processing Stack. Unity 2018.2+ is required; the C# renderer requests camera depth and blits with Hidden/Test/InverseProjection.

Demo scenes for Legacy, LWRP, and HDRP pipelines share one InverseProjection script and shader folder under Assets.

It is often cited for SSR, SSAO, and fog debugging and has hundreds of GitHub stars in Keijiro graphics sample set.