2D lights and shadows
light2d and occluder2d build a light map every sprite, polygon and tile is multiplied by, with shadows from the shapes a node has.
- Dragos Balaur
light2d and occluder2d build a light map every sprite, polygon and tile is
multiplied by. Shadows come from the shapes a node has.
-
light2dis point or directional, withcolor,radius,intensityandshadows. A point light fades quadratically to zero atradius, and unlit parts fall to the camera'sambient. -
An
occluder2dleft empty follows the node'scollider2d, or its circle, capsule, rect or sprite. A directional light casts parallel shadows.
-
post = ["bloom"]on the camera picks up anintensitypast 1.ssao,ssranddofare the 3D passes. -
In the editor, a Lights chip draws every light's reach and every occluder's resolved outline, and the Polygon tool traces an occluder in Points mode.

[nodes.light2d]
kind = "point"
color = "#ffd28a"
radius = 8.0
intensity = 1.6
shadows = true
Lights are outside the simulation. A scene with no light2d adds no pass. A
frame draws at most 64 lights.
Rendering has the rest.