Casts light in a 2D environment.
Casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). Note that Light2D can be used as a mask.
Return the color of the Light2D.
Return the energy value of the Light2D.
Return the height of the Light2D. Used with 2D normalmapping.
Set the maximum layer value of objects of the scene that are affected by the Light2D.
Get the minimum layer value of objects of the scene that are affected by the Light2D.
Return the current mode set to the Light2D.
Return the shadow buffer size.
Return the color of casted shadows for this Light2D.
Return the texture of the Light2D.
Return the offset of the light texture.
Return the scale value of the light texture.
Get the maximum Z value that objects of the scene can be in order to be affected by the Light2D.
Get the minimum Z value that objects of the scene have to be in order to be affected by the Light2D.
Return true if the Light2D is enabled, false if it is not.
Return true if shadow casting is enabled for this Light2D, else return false.
Set the color of the Light2D.
Switches the Light2D on or off, depending on the 'enabled' parameter.
Set the energy value of the Light2D. The bigger the value, the stronger the light.
Set the height of the Light2D. Used with 2D normalmapping.
Set the item mask of the Light2D to 'item_mask' value.
Set the item shadow mask to 'item_shadow_mask' value.
Set the maximum layer value of objects of the scene that are affected by the Light2D.
Set the minimum layer value of objects of the scene that are affected by the Light2D.
Set the behaviour mode of the Light2D. Use constants defined in the constants section.
Set the shadow buffer size.
Set the color of casted shadows for this Light2D.
Enable or disable shadows casting from this Light2D according to the 'enabled' parameter.
Set the texture of the Light2D.
Set the offset of the light texture.
Set the scale value of the light texture.
Set the maximum Z value that objects of the scene can be in order to be affected by the Light2D.
Set the minimum Z value that objects of the scene have to be in order to be affected by the Light2D.
The Light2D's [Color].
If [code]true[/code] Light2D will only appear when editing the scene. Default value: [code]false[/code].
If [code]true[/code] Light2D will emit light. Default value: [code]true[/code].
The Light2D's energy value. The larger the value, the stronger the light.
The Light2D's mode. See MODE_* constants for values.
The offset of the Light2D's [code]texture[/code].
The height of the Light2D. Used with 2D normal mapping.
The layer mask. Only objects with a matching mask will be affected by the Light2D.
Maximum layer value of objects that are affected by the Light2D. Default value: [code]0[/code].
Minimum layer value of objects that are affected by the Light2D. Default value: [code]0[/code].
Maximum [code]Z[/code] value of objects that are affected by the Light2D. Default value: [code]1024[/code].
Minimum [code]z[/code] value of objects that are affected by the Light2D. Default value: [code]-1024[/code].
Shadow buffer size. Default value: [code]2048[/code].
[Color] of shadows cast by the Light2D.
If [code]true[/code] the Light2D will cast shadows. Default value: [code]false[/code].
Shadow filter type. Use SHADOW_FILTER_* constants to set [code]shadow_filter[/code]. Default value: [code]None[/code].
Smoothing value for shadows.
Smooth shadow gradient length.
The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders with a matching shadow mask will cast shadows.
[Texture] used for the Light2D's appearance.
The [code]texture[/code]'s scale factor.
Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behaviour 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.
The light texture of the Light2D is used as a mask, hiding or revealing parts of the screen underneath depending on the value of each pixel of the light (mask) texture.
No filter applies to the shadow map. See [method shadow_filter].
Percentage closer filtering (3 samples) applies to the shadow map. See [method shadow_filter].
Percentage closer filtering (5 samples) applies to the shadow map. See [method shadow_filter].
Percentage closer filtering (7 samples) applies to the shadow map. See [method shadow_filter].
Percentage closer filtering (9 samples) applies to the shadow map. See [method shadow_filter].
Percentage closer filtering (13 samples) applies to the shadow map. See [method shadow_filter].