Casts light in a 2D environment.
Casts light in a 2D environment. A light is defined as a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related).
$DOCS_URL/tutorials/2d/2d_lights_and_shadows.html
Returns the light's height, which is used in 2D normal mapping. See [member PointLight2D.height] and [member DirectionalLight2D.height].
Sets the light's height, which is used in 2D normal mapping. See [member PointLight2D.height] and [member DirectionalLight2D.height].
The Light2D's blend mode. See [enum BlendMode] constants for values.
The Light2D's [Color].
If [code]true[/code], Light2D will only appear when editing the scene.
If [code]true[/code], Light2D will emit light.
The Light2D's energy value. The larger the value, the stronger the light.
The layer mask. Only objects with a matching [member CanvasItem.light_mask] will be affected by the Light2D. See also [member shadow_item_cull_mask], which affects which objects can cast shadows.
[b]Note:[/b] [member range_item_cull_mask] is ignored by [DirectionalLight2D], which will always light a 2D node regardless of the 2D node's [member CanvasItem.light_mask].
Maximum layer value of objects that are affected by the Light2D.
Minimum layer value of objects that are affected by the Light2D.
Maximum [code]z[/code] value of objects that are affected by the Light2D.
Minimum [code]z[/code] value of objects that are affected by the Light2D.
[Color] of shadows cast by the Light2D.
If [code]true[/code], the Light2D will cast shadows.
Shadow filter type. See [enum ShadowFilter] for possible values.
Smoothing value for shadows. Higher values will result in softer shadows, at the cost of visible streaks that can appear in shadow rendering. [member shadow_filter_smooth] only has an effect if [member shadow_filter] is [constant SHADOW_FILTER_PCF5] or [constant SHADOW_FILTER_PCF13].
The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders with a matching [member CanvasItem.light_mask] will cast shadows. See also [member range_item_cull_mask], which affects which objects can [i]receive[/i] the light.
No filter applies to the shadow map. This provides hard shadow edges and is the fastest to render. See [member shadow_filter].
Percentage closer filtering (5 samples) applies to the shadow map. This is slower compared to hard shadow rendering. See [member shadow_filter].
Percentage closer filtering (13 samples) applies to the shadow map. This is the slowest shadow filtereing mode, and should be used sparingly. See [member shadow_filter].
Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behavior of a light.
Subtracts the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect.
Mix the value of pixels corresponding to the Light2D to the values of pixels under it by linear interpolation.