What it does

A Shadow Map stores the depth of the nearest surface seen from a light. When shading another surface, comparing its distance with that map indicates whether something lies between it and the light.

Figure: Conceptual relationship: Render depth from light → Compare receiver depth → Estimate shadowing
Figure: Conceptual relationship: Render depth from light → Compare receiver depth → Estimate shadowing

How to use it

Shadow mapping compares light-view stored depth against the receiving point’s light-space depth. It is not the camera depth texture and needs appropriate casting/receiving shader behavior.

A concrete example

A low-resolution map spread over a large area allocates large world regions to each texel. Excess bias can hide acne while visibly detaching shadows.

How to check it

  1. Establish a single-light cube scene and vary coverage, resolution and bias separately.
    Light, occluder and receiving surface
    Light, occluder and receiving surface
  2. Diagnose missing shadows through distance and caster/receiver support before tuning edge quality.
    Light, occluder and receiving surface
    Light, occluder and receiving surface

Limitations

Resolution, bias, and projection introduce errors; the approximation is not universally exact.

References