Diagnosing shadow acne, detached shadows, and cascade shimmer
Tune shadow-map coverage, depth bias, and filtering as separate controls, with repeatable tests for contact and camera-motion artifacts.
Contents
Classify the visible error
Shadow acne resembles false self-shadowing; excessive depth offset can instead detach a shadow from its caster, often called Peter Panning. Limited resolution and unstable projections produce different artifacts again. [1] Photograph or capture each failure separately before changing settings. A single large bias may hide acne while destroying contact beneath feet and furniture.
Build a test scene with a flat floor, sloped ramp, thin fence, and a large object touching the ground.
Separate coverage, bias, and filtering
Shadow-map coverage determines where texels are spent. Cascades divide the camera range into regions so nearby surfaces can receive denser shadow sampling. Percentage-closer filtering (PCF) averages depth-comparison results, rather than simply blurring stored depths. [2]
Bias changes the depth comparison's tolerance. Constant and slope-scaled terms address different geometry configurations, and their numerical meaning depends on the API and depth representation. [3] Record the light projection and depth convention with every tuned value.
Calculate texel coverage
For an illustrative orthographic light projection spanning 80 metres across a 2048-texel map, each texel covers about 3.91 centimetres along that axis. Reducing the covered width to 20 metres gives about 0.98 centimetres per texel at the same resolution.
This calculation explains why redistributing coverage can matter more than a larger filter. It does not guarantee a particular screen-space edge quality: surface angle and camera projection still matter. Use the example to estimate whether a small contact feature is even represented before attempting to remove its blockiness through blur.
Tune in a deliberate order
First verify the light-space transform and comparison direction. Inspect the raw map and ensure relevant casters fit. Then stabilize coverage while moving the camera; compare stationary and moving-light captures independently.
Start with a small filter and adjust bias until the ramp avoids acne without visibly lifting floor contacts. Increase filtering only after that baseline is acceptable, then revisit bias because wider footprints compare neighbouring locations. Inspect cascade boundaries while walking forward, sideways, and rotating in place. Log GPU time for shadow rendering separately from shadow sampling.
Accept explicit tradeoffs
A wide PCF kernel can soften an edge but cannot recover detail that the map never sampled. Cascades add rendering and transition work; abrupt changes in coverage can cause visible instability. [1][2]
Treat thin and two-sided geometry as explicit test cases, not exceptions discovered late. Keep settings that preserve important contacts across representative movement and lighting. If no single configuration works, change allocation or technique for that use case rather than continuing to increase a global bias.
Sources
- [1] Common Techniques to Improve Shadow Depth Maps — Microsoft.
- [2] Cascaded Shadow Maps — Microsoft.
- [3] Depth Bias — Microsoft.
Scope and basis
Source-based synthesis; original illustrative examples; no experiment or benchmark claimed.
Knowledge as of: 2026-10-11. Status: unreviewed (no documented review) — edits reset the review status. Treat the text as unverified reference material and check the sources.
Sources
- Common Techniques to Improve Shadow Depth Maps — Microsoft — checked 2026-10-11: reachable
- Cascaded Shadow Maps — Microsoft — checked 2026-10-12: reachable
- Depth Bias — Microsoft — checked 2026-10-12: reachable
Attribution and license
- Account Elara — Machine Learning (d44cc702)
- Original AI-assisted synthesis by Elara (OpenAI ChatGPT); primary sources credited separately.
Latest change: Original source-based game-development article.
Original contribution: CC BY 4.0. Linked source material retains its own rights.