Provides a base class for different kinds of light nodes.
Light is the abstract base class for light nodes. As it can't be instanced, it shouldn't be used directly. Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting.
Param PARAM_ENERGY =
Constant for accessing light_energy.
Param PARAM_INDIRECT_ENERGY =
Constant for accessing light_indirect_energy.
Param PARAM_SIZE =
Constant for accessing light_size.
Param PARAM_SPECULAR =
Constant for accessing light_specular.
Param PARAM_RANGE =
Param PARAM_ATTENUATION =
Param PARAM_SPOT_ANGLE =
Constant for accessing SpotLight.spot_angle.
Param PARAM_SPOT_ATTENUATION =
Constant for accessing SpotLight.spot_angle_attenuation.
Param PARAM_CONTACT_SHADOW_SIZE =
Constant for accessing shadow_contact.
Param PARAM_SHADOW_MAX_DISTANCE =
Constant for accessing DirectionalLight.directional_shadow_max_distance.
Param PARAM_SHADOW_SPLIT_1_OFFSET =
Constant for accessing DirectionalLight.directional_shadow_split_1.
Param PARAM_SHADOW_SPLIT_2_OFFSET =
Constant for accessing DirectionalLight.directional_shadow_split_2.
Param PARAM_SHADOW_SPLIT_3_OFFSET =
Constant for accessing DirectionalLight.directional_shadow_split_3.
Param PARAM_SHADOW_NORMAL_BIAS =
Constant for accessing DirectionalLight.directional_shadow_normal_bias.
Param PARAM_SHADOW_BIAS =
Constant for accessing shadow_bias.
Param PARAM_SHADOW_BIAS_SPLIT_SCALE =
Constant for accessing DirectionalLight.directional_shadow_bias_split_scale.
Param PARAM_MAX =
Represents the size of the Param enum.
BakeMode BAKE_DISABLED =
Light is ignored when baking.
Note: Hiding a light does not affect baking.
BakeMode BAKE_INDIRECT =
Only indirect lighting will be baked (default).
BakeMode BAKE_ALL =
Both direct and indirect light will be baked.
Note: You should hide the light if you don't want it to appear twice (dynamic and baked).
bool editor_only =
true, the light only appears in the editor and will not be visible at runtime.
BakeMode light_bake_mode =
The light's bake mode. See BakeMode.
Color light_color =
Color( 1, 1, 1, 1 )
The light's color. An overbright color can be used to achieve a result equivalent to increasing the light's light_energy.
int light_cull_mask =
The light will affect objects in the selected layers.
float light_energy =
float light_indirect_energy =
bool light_negative =
true, the light's effect is reversed, darkening areas and casting bright shadows.
float light_size =
The size of the light in Godot units. Only considered in baked lightmaps and only if light_bake_mode is set to BAKE_ALL. Increasing this value will make the shadows appear blurrier. This can be used to simulate area lights to an extent.
float light_specular =
The intensity of the specular blob in objects affected by the light. At
0, the light becomes a pure diffuse light. When not baking emission, this can be used to avoid unrealistic reflections when placing lights above an emissive surface.
float shadow_bias =
Used to adjust shadow appearance. Too small a value results in self-shadowing ("shadow acne"), while too large a value causes shadows to separate from casters ("peter-panning"). Adjust as needed.
Color shadow_color =
Color( 0, 0, 0, 1 )
The color of shadows cast by this light.
float shadow_contact =
Attempts to reduce shadow_bias gap by rendering screen-space contact shadows. This has a performance impact, especially at higher values.
Note: Contact shadows can look broken, so leaving this property to
0.0 is recommended.
bool shadow_enabled =
true, the light will cast shadows.
bool shadow_reverse_cull_face =
true, reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with GeometryInstance.SHADOW_CASTING_SETTING_DOUBLE_SIDED.
Returns the value of the specified Param parameter.
Sets the value of the specified Param parameter.