Skip to content

HD Contact Shadows

JordanL8 edited this page Jan 16, 2019 · 3 revisions

The Contact Shadows Volume Component override specifies properties to control the behavior of Contacts Shadows. Contact Shadows are shadows that HDRP ray marches in screen space inside the depth buffer. The goal of using Contact Shadows is to capture small details that regular shadow mapping algorithms fail to capture.

You can enable Contact Shadows on a per Light basis for Directional, Point, and Spot Lights. Tick the Enable checkbox under the Contact Shadows drop-down in the Shadows section of each Light to indicate that HDRP should calculate Contact Shadows for that Light.

Note: For Mesh Renderer components, setting Cast Shadows to Off does not apply to Contact Shadows.

Contact shadow have a variable cost between 0.5 and 1.3 ms on the base PS4 at 1080p.

Property Description
Enable Tick this checkbox to enable Contact Shadows for this Volume.
Length The length of the rays, in Unity units, that HDRP uses for tracing. It also functions as the maximum distance at which the rays can captures details.
Distance Scale Factor HDRP scales Contact Shadows up with distance. Use this parameter to dampen the scale to avoid biasing artifacts with distance.
Max Distance The distance from the Camera, in Unity units, at which HDRP begins to fade Contact Shadows out to zero.
Fade Distance The distance, in Unity units, over which HDRP fades Contact Shadows out when at the Max Distance.
Sample Count The number of samples HDRP uses for ray casting. Increasing this will increase quality at the cost of performance.
Opacity The opacity of the Contact Shadows. Lower values result in softer, less prominent shadows.



SRP Core
High Definition Render Pipeline
Lightweight Render Pipeline
Shader Graph
Clone this wiki locally
You can’t perform that action at this time.