The 3D Handbook
Key term

Cascaded shadow maps

Splitting the camera's view into distance bands, each with its own shadow map, so the sun's shadows stay sharp near the player without running out of resolution in the distance.

lightingshadowsrenderingunitygodotunreal

Cascaded shadow maps (CSM) split the camera's view into several distance bands, called cascades, and render a separate shadow map for each. The nearest cascade covers a small area at high detail; the farthest covers a large area at low detail. It is the standard way to draw sun and moon shadows in real time, and the technique that Unreal's shadows and virtual shadow maps replace when enabled (Unreal Engine Documentation: Virtual Shadow Maps).

#Shadow resolution over distance

A shadow map is a depth image rendered from the light; see shadows and virtual shadow maps for the basics. A directional light has to shadow everything from the grass at the player's feet to hills hundreds of metres away. One map stretched over all of it gives the near ground almost no texels. Zhang, Sun and Nyman explain that this perspective aliasing "increases hyperbolically as the object moves near the view plane" (Zhang et al. 2007). Splitting the view lets each slice get its own map.

Godot's directional light defaults to "PSSM with 4 splits" (parallel-split shadow maps, another name for cascades), and its documentation describes it as splitting "the view frustum in 2 or 4 areas" (Godot Engine documentation: 3D lights and shadows). Unity URP exposes Max Distance, Cascade Count and the split distances in its pipeline asset, and notes that more cascades cost performance (Universal Render Pipeline manual: Universal Render Pipeline Asset reference).

#Choosing the splits

Where you put the split distances matters as much as how many cascades you use. GPU Gems 3 describes three schemes (Zhang et al. 2007):

  • Uniform: equal-length slices. Simple, but wastes resolution near the camera.
  • Logarithmic: slices that grow geometrically, "designed to produce optimal distribution of perspective aliasing". Its drawback: "the lengths of split parts near the viewer are too small" (Zhang et al. 2007).
  • Practical: a blend of the two, with a weight the authors set to 0.5 by default (Zhang et al. 2007).
Three horizontal bars from 1 to 200 metres, each divided into four cascades. Uniform splits at 50.8, 100.5 and 150.2 metres. Logarithmic splits at 3.8, 14.1 and 53.2 metres. Practical splits with a weight of 0.5 at 27.3, 57.3 and 101.7 metres. The first cascade in each is orange.
Split distances for four cascades between 1 m and 200 m, computed for this page with the three schemes from GPU Gems 3.Diagram by the handbook author

#Common artefacts

#Settings to tune first

  1. Max Distance. Godot says to "Always make sure to set a shadow Max Distance according to what the scene needs" (Godot Engine documentation: 3D lights and shadows). It has the largest effect of any single setting.
  2. The first split. "Default values generally work well, but tweaking the first split a bit is common" (Godot Engine documentation: 3D lights and shadows).
  3. Cascade count. Godot defaults to four (Godot Engine documentation: 3D lights and shadows); Unity notes that more cascades reduce performance (Universal Render Pipeline manual: Universal Render Pipeline Asset reference). Try fewer for small or top-down scenes.
  4. Bias, last, once the distances are right.

Related: real-time lighting, light and shadow, performance and profiling.

#Further reading and watching

References

  1. Epic Games · Virtual Shadow Maps · Unreal Engine Documentation, 2026 · docs · accessed 2026-10-21
  2. Fan Zhang, Hanqiu Sun and Oskari Nyman · Chapter 10. Parallel-Split Shadow Maps on Programmable GPUs · GPU Gems 3 (NVIDIA Developer), 2007 · book · accessed 2026-10-21
  3. Godot Engine contributors · 3D lights and shadows · Godot Engine documentation (source on GitHub), 2026 · docs · accessed 2026-10-21
  4. Unity Technologies · Universal Render Pipeline Asset reference (URP 17) · Universal Render Pipeline manual, 2026 · docs · accessed 2026-10-21

Last updated 2026-10-22