Metal Tutorial 4 — Shadows
Shadows are what make objects feel grounded in a scene. This tutorial implements shadow mapping: a depth-only first pass from the light’s perspective builds the shadow map, and the deferred lighting pass compares each fragment’s light-space depth against it to decide lit vs. shadowed.

What you’ll learn:
- Rendering a depth-only pass into an
MTLTextureshadow map - Transforming fragments to light space for depth comparison
- Shadow bias to avoid self-shadowing artifacts
- Percentage-closer filtering (PCF) for soft shadow edges