Improve the 3D light documentations
See https://github.com/godotengine/godot-docs/issues/3670.
(cherry picked from commit f7e21d8e88
)
This commit is contained in:
parent
fda49b74a1
commit
c87128fa06
|
@ -4,7 +4,7 @@
|
||||||
Provides a base class for different kinds of light nodes.
|
Provides a base class for different kinds of light nodes.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
Light is the abstract base class for light nodes, so it shouldn't be used directly (it can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting.
|
Light is the [i]abstract[/i] 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.
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
<link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
|
<link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
|
||||||
|
@ -39,13 +39,13 @@
|
||||||
The light's bake mode. See [enum BakeMode].
|
The light's bake mode. See [enum BakeMode].
|
||||||
</member>
|
</member>
|
||||||
<member name="light_color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
|
<member name="light_color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
|
||||||
The light's color.
|
The light's color. An [i]overbright[/i] color can be used to achieve a result equivalent to increasing the light's [member light_energy].
|
||||||
</member>
|
</member>
|
||||||
<member name="light_cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295">
|
<member name="light_cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295">
|
||||||
The light will affect objects in the selected layers.
|
The light will affect objects in the selected layers.
|
||||||
</member>
|
</member>
|
||||||
<member name="light_energy" type="float" setter="set_param" getter="get_param" default="1.0">
|
<member name="light_energy" type="float" setter="set_param" getter="get_param" default="1.0">
|
||||||
The light's strength multiplier.
|
The light's strength multiplier (this is not a physical unit). For [OmniLight] and [SpotLight], changing this value will only change the light color's intensity, not the light's radius.
|
||||||
</member>
|
</member>
|
||||||
<member name="light_indirect_energy" type="float" setter="set_param" getter="get_param" default="1.0">
|
<member name="light_indirect_energy" type="float" setter="set_param" getter="get_param" default="1.0">
|
||||||
Secondary multiplier used with indirect light (light bounces). This works on both [BakedLightmap] and [GIProbe].
|
Secondary multiplier used with indirect light (light bounces). This works on both [BakedLightmap] and [GIProbe].
|
||||||
|
@ -54,10 +54,10 @@
|
||||||
If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows.
|
If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows.
|
||||||
</member>
|
</member>
|
||||||
<member name="light_specular" type="float" setter="set_param" getter="get_param" default="0.5">
|
<member name="light_specular" type="float" setter="set_param" getter="get_param" default="0.5">
|
||||||
The intensity of the specular blob in objects affected by the light. At [code]0[/code] the light becomes a pure diffuse light.
|
The intensity of the specular blob in objects affected by the light. At [code]0[/code], 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.
|
||||||
</member>
|
</member>
|
||||||
<member name="shadow_bias" type="float" setter="set_param" getter="get_param" default="0.15">
|
<member name="shadow_bias" type="float" setter="set_param" getter="get_param" default="0.15">
|
||||||
Used to adjust shadow appearance. Too small a value results in self-shadowing, while too large a value causes shadows to separate from casters. Adjust as needed.
|
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.
|
||||||
</member>
|
</member>
|
||||||
<member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color( 0, 0, 0, 1 )">
|
<member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color( 0, 0, 0, 1 )">
|
||||||
The color of shadows cast by this light.
|
The color of shadows cast by this light.
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
The light's attenuation (drop-off) curve. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve.
|
The light's attenuation (drop-off) curve. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve.
|
||||||
</member>
|
</member>
|
||||||
<member name="omni_range" type="float" setter="set_param" getter="get_param" default="5.0">
|
<member name="omni_range" type="float" setter="set_param" getter="get_param" default="5.0">
|
||||||
The light's radius.
|
The light's radius. Note that the effectively lit area may appear to be smaller depending on the [member omni_attenuation] in use. No matter the [member omni_attenuation] in use, the light will never reach anything outside this radius.
|
||||||
</member>
|
</member>
|
||||||
<member name="omni_shadow_detail" type="int" setter="set_shadow_detail" getter="get_shadow_detail" enum="OmniLight.ShadowDetail" default="1">
|
<member name="omni_shadow_detail" type="int" setter="set_shadow_detail" getter="get_shadow_detail" enum="OmniLight.ShadowDetail" default="1">
|
||||||
See [enum ShadowDetail].
|
See [enum ShadowDetail].
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
The spotlight's light energy attenuation curve.
|
The spotlight's light energy attenuation curve.
|
||||||
</member>
|
</member>
|
||||||
<member name="spot_range" type="float" setter="set_param" getter="get_param" default="5.0">
|
<member name="spot_range" type="float" setter="set_param" getter="get_param" default="5.0">
|
||||||
The maximal range that can be reached by the spotlight.
|
The maximal range that can be reached by the spotlight. Note that the effectively lit area may appear to be smaller depending on the [member spot_attenuation] in use. No matter the [member spot_attenuation] in use, the light will never reach anything outside this range.
|
||||||
</member>
|
</member>
|
||||||
</members>
|
</members>
|
||||||
<constants>
|
<constants>
|
||||||
|
|
Loading…
Reference in New Issue