# Light Occluder 2D

> Aego 0.12.5 · development; docs build `4a32b816933e02930662f6a443cb25abe6050d090c55e237cbff5c44ae9b25f8`. [Build manifest](/docs-build.json).

```
component engine.LightOccluder2D
```

A planar shadow contour. Manual polygons require no Physics module; ShapeProvider reads local geometry through the shapes2d contract.

[LightOccluder2D](/ref/engine.LightOccluder2D.md) describes shadow geometry independently of the visible sprite. `Polygon` uses local points; enable `closed` for a simple polygon without holes, or leave it off for a chain. The validator rejects non-finite points, zero-length edges and self-intersections. A sprite does not become an occluder automatically.

In Scene View, drag a vertex to move it, drag an edge midpoint to insert a vertex, or Alt-click a vertex to remove it. Each gesture uses one History transaction. `ShapeProvider` instead copies local geometry from a provider such as Physics, identified by `shapeNode` and a stable shape key. Physics is optional: the Try scene uses only a manual polygon. Changing collision masks does not change `layers` here.

Point, Spot and Sprite lights share the planar shadow algorithm. Overlapping volumes form a union. A light inside a closed contour is blocked by that contour; a receiver does not automatically ignore its own contour. `cullMode` chooses the accepted edge winding independently of a physics chain's one-sided setting. Softness filters each mask within a bounded radius and does not simulate an area light.

Offscreen casters remain eligible when their shadows reach a visible receiver. Light and occluder geometry use presentation transforms, including interpolated motion. Static light-space masks are reused while only the camera moves; moving a light or caster, changing its contour, resolution or filtering invalidates the relevant mask. The Inspector shows active mask layers with the owning light, and Scene View's shadow display shows visibility on Lit surfaces.

## Fields

| Name | Script name | Type | Default | Description |
|---|---|---|---|---|
| Source | `Source` | `enum` | `polygon` | Use a manual polygon/chain or a registered local-shape provider. |
| Polygon | `Polygon` | `[]Vec2` | `[4 items]` | Simple local-space contour without holes; points follow the owner's presentation transform once. |
| Closed | `Closed` | `bool` | `true` | Close the manual polygon. A ShapeProvider supplies each contour's closed state. |
| Cull Mode | `CullMode` | `enum` | `none` | Shadow edge winding policy; independent of any physics one-sided setting. |
| Layers | `Layers` | `int` | `-1` | 64-bit shadow participation mask. -1 is all bits; zero casts no shadows. |
| Shape Node | `ShapeNode` | `NodeRef` | `none` | Source node for ShapeProvider. Empty uses this node; unresolved IDs are preserved. |
| Shape | `Shape` | `string` | `""` | Stable provider shape key, such as physics.BoxCollider2D. Empty selects all of the source node's shapes. |
