Skip to content

Shadows

Vladislav Kantaev edited this page Oct 26, 2023 · 6 revisions

Setup

To enable shadows:

  • In the pipeline asset's Shadows section, set Mode to Vsm;
  • Ensure the Directional toggle in Shadows/VSM is enabled;
  • Ensure the main (directional) light on the scene is:
    • enabled;
    • Mode is set to Realtime or Mixed;
    • Shadow Type is any mode other than No Shadows.

📝 Note: this page describes the traditional approach for shadow maps. Toon RP also supports Variance Shadow Maps and Blob Shadows.

Common Parameters

Shadow Ramp

Shadow receivers use a ramp separate from the global when applying shadows.

Threshold, Crisp Anti Aliased, and Smoothness control the shadow ramp.

Shadow Distance

Increasing Max Distance improves the general draw distance for shadows. However, the larger the distance, the less detailed shadows are.

Distance Fade controls how smooth should the shadows be cut off near the max distance.

Pattern

A stylized pattern can be applied to shadows. The pattern is sampled using world space position. Tiling can be controlled via Pattern Scale.

Example with pattern Pattern Texture and scale (1, 0, 1):

Pattern Example