Figure: Diagnostic workflow: Inspect shadow errors → Adjust bias gradually → Balance acne and leaks
Figure: Diagnostic workflow: Inspect shadow errors → Adjust bias gradually → Balance acne and leaks

Cause and mechanism

Shadow acne appears as stripes or spots where a surface incorrectly shadows itself. Bias offsets the depth comparison and can reduce it, but too much bias separates contact shadows or lets light through thin walls. Jagged shadow edges can instead indicate insufficient shadow-map resolution, so test that separately.

Check and correct the setup

  1. Distinguish acne, texel aliasing, and detached shadows; record current settings.
    Light, occluder and receiving surface
    Light, occluder and receiving surface
  2. Adjust depth/normal bias incrementally on slopes, thin walls, and contact areas; there is no universal correct value.
    Light, occluder and receiving surface
    Light, occluder and receiving surface
  3. Balance shadow distance, cascades, and resolution for near and far quality.
    Light, occluder and receiving surface
    Light, occluder and receiving surface

Limits and verification

Normal bias can also cause leaks or shape distortion. Bias scales/settings differ between pipelines; do not copy fixed values blindly.

A focused diagnostic setup

Use one directional light with a floor, slope, thin wall and raised cube. Distinguish self-shadow stripes, jagged boundaries and detached contact shadows.

Test in this order

  1. Record quality/asset, bias, distance and resolution for a reversible baseline.
    Light, occluder and receiving surface
    Light, occluder and receiving surface
  2. Vary depth bias alone, then normal bias separately, checking contact, slopes and thin walls.
    Light, occluder and receiving surface
    Light, occluder and receiving surface
  3. Move through near/far views and compare resolution/cascade allocation.
    Light, occluder and receiving surface
    Light, occluder and receiving surface

Interpret the result

Less acne with detached shadows is not an overall success. Remaining jaggies suggest shadow texel density. Choose from recorded comparisons rather than a universal bias value.

Related explanations

References