Course contentsShow
← Unity Game Development
Lesson 706 of 82810. VFX and Post-ProcessingFree lesson

Managing Shadow Cascades for Large Environments

You will learn to configure shadow cascade levels to maintain sharp shadow quality across vast, open-world game terrains.

In this lesson, you will learn how to configure shadow cascade levels to maintain sharp shadow quality across vast, open-world game terrains.

When rendering large, open-world environments, a single shadow map covering the entire scene will result in blocky, pixelated shadows because the shadow map resolution is stretched across too large an area. Shadow cascades solve this by splitting the camera's view distance into distinct zones. Unity generates high-resolution shadow maps for objects near the camera and progressively lower-resolution maps for objects further away.

Configuring Cascade Settings

To manage these zones, navigate to your Universal Render Pipeline (URP) Asset. Under the Shadows section, you will find the Cascades setting. Increasing the cascade count (typically 2 or 4) allows for a more granular transition of shadow quality.

The key to a large environment is the Cascade Splits parameter. This defines where the transition between one cascade and the next occurs:

  • Near Cascade: Covers the immediate area around the player (highest shadow texel density).
  • Far Cascade: Covers the distant terrain (lowest density, where pixelation is less noticeable).

If your terrain looks sharp at your feet but "shimmers" or loses quality too quickly as you look toward the horizon, you need to adjust your cascade splits. A common strategy is to set the first split closer to the camera to prioritize the player’s immediate vicinity:

// Conceptually, you are balancing memory vs. visual fidelity
// More cascades = higher memory overhead and draw call complexity
// Fewer cascades = lower performance cost, but poor shadow crispness

Balancing Performance

While adding more cascades improves quality, it increases the number of shadow-casting objects rendered each frame. For massive open worlds, avoid setting the cascade count to the maximum if you are targeting mobile or mid-tier hardware. Instead, focus on Shadow Distance. Keep the total shadow distance as tight as possible—if players can't see shadows 500 meters away, reduce the distance to 200 meters to reclaim performance, which in turn makes the remaining shadow map resolution more effective.

Key Takeaway: Shadow cascades intelligently distribute shadow map resolution based on distance, allowing you to keep the player's immediate surroundings sharp while maintaining performance across expansive terrain.