# 4. Shadow Caster 2D and Composite Part of [[2D Lighting in URP]]. Prev: [[3. Target Sorting Layers]]. Next: [[5. Worked Example Interior Window and Lantern]]. 6000.5 2D shadows need two sides: 1. On the **Light 2D**, enable **Shadows** (intensity / softness: use the Inspector fields). **Global lights have no shadow properties** - they will not cast 2D shadows no matter how many casters you add. 2. On the **occluder**, add **Shadow Caster 2D**. The caster uses a shape (often generated from the sprite / collider - confirm the 6000.5 component's "generate from" options). Trim the shape so a character's cape does not throw a building-sized shadow unless you want that. ## 4.1 Composite Shadow Caster 2D A parent with **Composite Shadow Caster 2D** **merges child** Shadow Caster 2D shapes into one caster. Use it for a house made of many sprite tiles, or a cluster of props that should shadow as one volume (cheaper, fewer seams). Children still need their casters; the composite is the merge, not a replacement for "forgot to add a caster on the child." ## 4.2 Practical limits - Self-shadowing and hair-thin sprites are finicky. A capsule caster under the feet is often better than a pixel-perfect outline. - A moving lantern (Spot, shadows on) plus many casters is the expensive case. Bake the *architecture* as static casters; keep dynamic casters for the actor and a few props. - Sorting: a caster on the wrong sorting layer / Z can shadow objects you did not expect, or none at all. Preview in Game view, not only Scene gizmos. ## 4.3 Exercise A wall sprite with Shadow Caster 2D, a Spot in front of it, Shadows enabled on the light. A character-sized sprite on the far side should fall into the shadow. Add two wall tiles under a Composite Shadow Caster 2D parent and confirm the shadow is one volume, not a seam of two. ## Sources - Light 2D (shadows; Global has no shadow properties) (6000.5): https://docs.unity.com/en-us/engine/6000.5/manual/2drenderer-light-2d - 6000.5 2D shadows / Shadow Caster 2D manual page (search "Shadow Caster 2D" / "Prepare and use 2D shadows" in the 6000.5 manual if a saved URL 404s)