Skip to main content
100%

Gist 3743ce0f15cabc0331dce136e0db4168

✓ Published0🌍 Public
Aandybak
Last edited Nov 17, 2019
Created on Nov 17, 2019

This example demonstrates a custom outline effect for the Unity Universal Render Pipeline (URP). It consists of a `ScriptableRendererFeature` that injects a depth-normals prepass, which renders the scene’s depth and normal information into a texture. A Shader Graph custom node exposes this `_CameraDepthNormalsTexture` as an input, and an HLSL function compares depth and normal values at neighboring screen-space texels to detect edges. The effect produces a stylized outline by thresholding depth discontinuities and normal differences, with adjustable scale, depth threshold, normal threshold, and texel size.

AI-generated description

Similar vizzes