The 3D Handbook
Key term

Shadows and virtual shadow maps

How real-time shadows are stored in shadow maps, why cascades exist, how Unreal's virtual shadow maps give 16k-resolution shadows by paging, and what that means for Nanite, foliage and World Position Offset.

shadowslightingunrealnaniteoptimisation

A shadow map is a depth image rendered from a light's point of view; the engine checks it to see whether anything sits between a pixel and the light. Virtual shadow maps (VSMs) are Unreal Engine 5's version of the idea, which Epic describes as "the new shadow mapping method used to deliver consistent, high-resolution shadowing" (Unreal Engine Documentation: Virtual Shadow Maps).

#Resolution limits of shadow maps

A shadow map has a fixed number of texels. A sun shadow must cover everything from the grass at your feet to distant mountains, so one map spreads its texels too thin near the camera. The classic fix is cascaded shadow maps: split the view into distance bands and give each band its own map.

Godot's directional light defaults to "PSSM with 4 splits", each set relative to the shadow Max Distance (Godot Engine documentation: 3D lights and shadows). Unity URP exposes Max Distance, Cascade Count and split distances in its pipeline asset (Universal RP 17 documentation: Universal Render Pipeline Asset).

Left, a top-down camera frustum divided into four bands of increasing size, labelled 1 to 4. Right, five nested squares centred on the camera, each twice the size of the one inside it, with the smallest highlighted as the finest level.
Left: cascades split the view frustum into bands, each with its own map. Right: a VSM clipmap places nested levels around the camera, each covering twice the radius of the last.Diagram by the handbook author, after Epic's VSM documentation

#How virtual shadow maps work

VSMs use far bigger maps than any GPU could hold, and keep only the parts that are needed.

Soft shadows come from Shadow Map Ray Tracing (SMRT), which shoots several rays towards the light; their spread follows Source Radius on local lights and Source Angle on the sun (Unreal Engine Documentation: Virtual Shadow Maps).

#What VSMs mean for your assets

#Common mistakes

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. Godot Engine contributors · 3D lights and shadows · Godot Engine documentation (source on GitHub), 2026 · docs · accessed 2026-10-21
  3. Unity Technologies · Universal Render Pipeline Asset · Universal RP 17 documentation, 2026 · docs · accessed 2026-10-21
  4. Epic Games · Bringing Nanite to Fortnite Battle Royale in Chapter 4 · Unreal Engine tech blog · article · accessed 2026-10-21
  5. Andrew Lauritzen and Ola Olsson (Epic Games) · Virtual Shadow Maps in Fortnite Battle Royale Chapter 4 · Unreal Engine tech blog, 2023 · article · accessed 2026-10-22
  6. Andrea Sancio (The Chinese Room) · Dev Diary #5: A Dive into Next-Gen Game Development · Paradox Interactive, 2023 · article · accessed 2026-10-22

Last updated 2026-10-22