Post
The standard technique for rendering realistic shadows by seeing the world from the light's perspective.
Shadow mapping works in two passes. First, the scene is rendered from the light source's point of view, creating a depth map that records how far each visible surface is from the light. Then, during the main render, each pixel checks whether it is further from the light than what the shadow map recorded. If it is, something is blocking the light, and that pixel is in shadow. The technique is elegant but imperfect: limited shadow map resolution causes jagged shadow edges, objects very far from the light lose shadow detail, and multiple shadow-casting lights multiply the performance cost. Cascaded Shadow Maps split the view frustum into sections with different resolutions to address the distance problem.
Example
Horizon Forbidden West uses cascaded shadow maps to maintain sharp character shadows up close while still rendering mountain shadows in the distance. Dark Souls III's shadow mapping creates the atmospheric dungeon lighting that defines the series' aesthetic, with torchlight casting dynamic shadows through iron gates and along stone corridors. Minecraft's shader mods like SEUS add shadow mapping to a game that originally had none, transforming the visual experience dramatically.
Why it matters
Shadows are fundamental to how we perceive depth and spatial relationships. Shadow mapping has been the dominant real-time shadow technique for two decades because it provides a good balance of quality and performance. Understanding its limitations explains common visual artifacts like shadow acne, peter-panning, and the jagged shadow edges you see in many games.
Related concepts