diff options
Diffstat (limited to 'doc')
24 files changed, 594 insertions, 276 deletions
diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml index d574bc044d..f6e2fc5eb2 100644 --- a/doc/classes/AnimationNodeTransition.xml +++ b/doc/classes/AnimationNodeTransition.xml @@ -40,12 +40,12 @@ </method> </methods> <members> + <member name="enabled_inputs" type="int" setter="set_enabled_inputs" getter="get_enabled_inputs" default="0"> + The number of enabled input ports for this node. + </member> <member name="from_start" type="bool" setter="set_from_start" getter="is_from_start" default="true"> If [code]true[/code], the destination animation is played back from the beginning when switched. </member> - <member name="input_count" type="int" setter="set_enabled_inputs" getter="get_enabled_inputs" default="0"> - The number of available input ports for this node. - </member> <member name="xfade_curve" type="Curve" setter="set_xfade_curve" getter="get_xfade_curve"> </member> <member name="xfade_time" type="float" setter="set_xfade_time" getter="get_xfade_time" default="0.0"> diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index 2262c4fe47..ee28675d89 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -194,10 +194,13 @@ The emitted light's color. See [member emission_enabled]. </member> <member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> - If [code]true[/code], the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a [VoxelGI] is used and this object is used in baked lighting. + If [code]true[/code], the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a [VoxelGI], SDFGI, or [LightmapGI] is used and this object is used in baked lighting. </member> - <member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy" default="1.0"> - The emitted light's strength. See [member emission_enabled]. + <member name="emission_energy_multiplier" type="float" setter="set_emission_energy_multiplier" getter="get_emission_energy_multiplier" default="1.0"> + Multiplier for emitted light. See [member emission_enabled]. + </member> + <member name="emission_intensity" type="float" setter="set_emission_intensity" getter="get_emission_intensity"> + Luminance of emitted light, measured in nits (candela per square meter). Only available when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled. The default is roughly equivalent to an indoor lightbulb. </member> <member name="emission_on_uv2" type="bool" setter="set_flag" getter="get_flag" default="false"> Use [code]UV2[/code] to read from the [member emission_texture]. diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml index 65fdecc3c6..322c4f0bf4 100644 --- a/doc/classes/Camera3D.xml +++ b/doc/classes/Camera3D.xml @@ -150,6 +150,9 @@ </method> </methods> <members> + <member name="attributes" type="CameraAttributes" setter="set_attributes" getter="get_attributes"> + The [CameraAttributes] to use for this camera. + </member> <member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="1048575"> The culling mask that describes which 3D render layers are rendered by this camera. </member> @@ -160,9 +163,6 @@ <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="Camera3D.DopplerTracking" default="0"> If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] for objects changed in particular [code]_process[/code] methods. See [enum DopplerTracking] for possible values. </member> - <member name="effects" type="CameraEffects" setter="set_effects" getter="get_effects"> - The [CameraEffects] to use for this camera. - </member> <member name="environment" type="Environment" setter="set_environment" getter="get_environment"> The [Environment] to use for this camera. </member> diff --git a/doc/classes/CameraAttributes.xml b/doc/classes/CameraAttributes.xml new file mode 100644 index 0000000000..a741728c14 --- /dev/null +++ b/doc/classes/CameraAttributes.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="CameraAttributes" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + Parent class for camera settings. + </brief_description> + <description> + Controls camera-specific attributes such as depth of field and exposure override. + When used in a [WorldEnvironment] it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own [CameraAttributes], including the editor camera. When used in a [Camera3D] it will override any [CameraAttributes] set in the [WorldEnvironment]. When used in [VoxelGI] or [LightmapGI], only the exposure settings will be used. + See also [Environment] for general 3D environment settings. + This is a pure virtual class that is inherited by [CameraAttributesPhysical] and [CameraAttributesPractical]. + </description> + <tutorials> + </tutorials> + <members> + <member name="auto_exposure_enabled" type="bool" setter="set_auto_exposure_enabled" getter="is_auto_exposure_enabled"> + If [code]true[/code], enables the tonemapping auto exposure mode of the scene renderer. If [code]true[/code], the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light. + </member> + <member name="auto_exposure_scale" type="float" setter="set_auto_exposure_scale" getter="get_auto_exposure_scale"> + The scale of the auto exposure effect. Affects the intensity of auto exposure. + </member> + <member name="auto_exposure_speed" type="float" setter="set_auto_exposure_speed" getter="get_auto_exposure_speed"> + The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. + </member> + <member name="exposure_multiplier" type="float" setter="set_exposure_multiplier" getter="get_exposure_multiplier"> + Multiplier for the exposure amount. A higher value results in a brighter image. + </member> + <member name="exposure_sensitivity" type="float" setter="set_exposure_sensitivity" getter="get_exposure_sensitivity"> + Sensitivity of camera sensors, measured in ISO. A higher sensitivity results in a brighter image. Only available when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled. When [member auto_exposure_enabled] this can be used as a method of exposure compensation, doubling the value will increase the exposure value (measured in EV100) by 1 stop. + </member> + </members> +</class> diff --git a/doc/classes/CameraAttributesPhysical.xml b/doc/classes/CameraAttributesPhysical.xml new file mode 100644 index 0000000000..a61e735932 --- /dev/null +++ b/doc/classes/CameraAttributesPhysical.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="CameraAttributesPhysical" inherits="CameraAttributes" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + Physically-based camera settings. + </brief_description> + <description> + [CameraAttributesPhysical] is used to set rendering settings based on a physically-based camera's settings. It is responsible for exposure, auto-exposure, and depth of field. + When used in a [WorldEnvironment] it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own [CameraAttributes], including the editor camera. When used in a [Camera3D] it will override any [CameraAttributes] set in the [WorldEnvironment] and will override the [Camera3D]s [member Camera3D.far], [member Camera3D.near], [member Camera3D.fov], and [member Camera3D.keep_aspect] properties. When used in [VoxelGI] or [LightmapGI], only the exposure settings will be used. + The default settings are intended for use in an outdoor environment, tips for settings for use in an indoor environment can be found in each setting's documentation. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_fov" qualifiers="const"> + <return type="float" /> + <description> + Returns the vertical field of view that corresponds to the [member frustum_focal_length]. This value is calculated internally whenever [member frustum_focal_length] is changed. + </description> + </method> + </methods> + <members> + <member name="auto_exposure_max_exposure_value" type="float" setter="set_auto_exposure_max_exposure_value" getter="get_auto_exposure_max_exposure_value" default="10.0"> + The maximum luminance (in EV100) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing below a certain brightness, resulting in a cut off point where the scene will remain bright. + </member> + <member name="auto_exposure_min_exposure_value" type="float" setter="set_auto_exposure_min_exposure_value" getter="get_auto_exposure_min_exposure_value" default="-8.0"> + The minimum luminance luminance (in EV100) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing above a certain brightness, resulting in a cut off point where the scene will remain dark. + </member> + <member name="exposure_aperture" type="float" setter="set_aperture" getter="get_aperture" default="16.0"> + Size of the aperture of the camera, measured in f-stops. An f-stop is a unitless ratio between the focal length of the camera and the diameter of the aperture. A high aperture setting will result in a smaller aperture which leads to a dimmer image and sharper focus. A low aperture results in a wide aperture which lets in more light resulting in a brighter, less-focused image. Default is appropriate for outdoors at daytime (i.e. for use with a default [DirectionalLight3D]), for indoor lighting, a value between 2 and 4 is more appropriate. + Only available when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled. + </member> + <member name="exposure_shutter_speed" type="float" setter="set_shutter_speed" getter="get_shutter_speed" default="100.0"> + Time for shutter to open and close, measured in seconds. A higher value will let in more light leading to a brighter image, while a lower amount will let in less light leading to a darker image. + Only available when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled. + </member> + <member name="frustum_far" type="float" setter="set_far" getter="get_far" default="4000.0"> + Override value for [member Camera3D.far]. Used internally when calculating depth of field. When attached to a [Camera3D] as its [member Camera3D.attributes], it will override the [member Camera3D.far] property. + </member> + <member name="frustum_focal_length" type="float" setter="set_focal_length" getter="get_focal_length" default="35.0"> + Distance between camera lens and camera aperture, measured in millimeters. Controls field of view and depth of field. A larger focal length will result in a smaller field of view and a narrower depth of field meaning fewer objects will be in focus. A smaller focal length will result in a wider field of view and a larger depth of field meaning more objects will be in focus. When attached to a [Camera3D] as its [member Camera3D.attributes], it will override the [member Camera3D.fov] property and the [member Camera3D.keep_aspect] property. + </member> + <member name="frustum_focus_distance" type="float" setter="set_focus_distance" getter="get_focus_distance" default="10.0"> + Distance from camera of object that will be in focus, measured in meters. Internally this will be clamped to be at least 1 millimeter larger than [member frustum_focal_length]. + </member> + <member name="frustum_near" type="float" setter="set_near" getter="get_near" default="0.05"> + Override value for [member Camera3D.near]. Used internally when calculating depth of field. When attached to a [Camera3D] as its [member Camera3D.attributes], it will override the [member Camera3D.near] property. + </member> + </members> +</class> diff --git a/doc/classes/CameraAttributesPractical.xml b/doc/classes/CameraAttributesPractical.xml new file mode 100644 index 0000000000..924b02fc79 --- /dev/null +++ b/doc/classes/CameraAttributesPractical.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="CameraAttributesPractical" inherits="CameraAttributes" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + Camera settings in an easy to use format. + </brief_description> + <description> + Controls camera-specific attributes such as auto-exposure, depth of field, and exposure override. + When used in a [WorldEnvironment] it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own [CameraAttributes], including the editor camera. When used in a [Camera3D] it will override any [CameraAttributes] set in the [WorldEnvironment]. When used in [VoxelGI] or [LightmapGI], only the exposure settings will be used. + </description> + <tutorials> + </tutorials> + <members> + <member name="auto_exposure_max_sensitivity" type="float" setter="set_auto_exposure_max_sensitivity" getter="get_auto_exposure_max_sensitivity" default="800.0"> + The maximum sensitivity (in ISO) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing below a certain brightness, resulting in a cut off point where the scene will remain bright. + </member> + <member name="auto_exposure_min_sensitivity" type="float" setter="set_auto_exposure_min_sensitivity" getter="get_auto_exposure_min_sensitivity" default="0.0"> + The minimum sensitivity (in ISO) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing above a certain brightness, resulting in a cut off point where the scene will remain dark. + </member> + <member name="dof_blur_amount" type="float" setter="set_dof_blur_amount" getter="get_dof_blur_amount" default="0.1"> + Sets the maximum amount of blur. When using physically-based blur amounts, will instead act as a multiplier. High values lead to an increased amount of bluriness, but can be much more expensive to calculate. It is best to keep this as low as possible for a given art style. + </member> + <member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance" default="10.0"> + Objects further from the [Camera3D] by this amount will be blurred by the depth of field effect. Measured in meters. + </member> + <member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled" default="false"> + Enables depth of field blur for objects further than [member dof_blur_far_distance]. Strength of blur is controlled by [member dof_blur_amount] and modulated by [member dof_blur_far_transition]. + </member> + <member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition" default="5.0"> + When positive, distance over which (starting from [member dof_blur_far_distance]) blur effect will scale from 0 to [member dof_blur_amount]. When negative, uses physically-based scaling so depth of field effect will scale from 0 at [member dof_blur_far_distance] and will increase in a physically accurate way as objects get further from the [Camera3D]. + </member> + <member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance" default="2.0"> + Objects closer from the [Camera3D] by this amount will be blurred by the depth of field effect. Measured in meters. + </member> + <member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled" default="false"> + Enables depth of field blur for objects closer than [member dof_blur_near_distance]. Strength of blur is controlled by [member dof_blur_amount] and modulated by [member dof_blur_near_transition]. + </member> + <member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition" default="1.0"> + When positive, distance over which blur effect will scale from 0 to [member dof_blur_amount], ending at [member dof_blur_near_distance]. When negative, uses physically-based scaling so depth of field effect will scale from 0 at [member dof_blur_near_distance] and will increase in a physically accurate way as objects get closer to the [Camera3D]. + </member> + </members> +</class> diff --git a/doc/classes/CameraEffects.xml b/doc/classes/CameraEffects.xml deleted file mode 100644 index c108b30f23..0000000000 --- a/doc/classes/CameraEffects.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="CameraEffects" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> - <brief_description> - Contains camera-specific effects such as depth of field and exposure override. - </brief_description> - <description> - Contains camera-specific effects such as depth of field and exposure override. - See also [Environment] for general 3D environment settings. - </description> - <tutorials> - </tutorials> - <members> - <member name="dof_blur_amount" type="float" setter="set_dof_blur_amount" getter="get_dof_blur_amount" default="0.1"> - The amount of blur for both near and far depth-of-field effects. The amount of blur increases the radius of the blur effect, making the affected area blurrier. However, If the amount is too high, you might start to see lines appearing, especially when using a low quality blur. - </member> - <member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance" default="10.0"> - The distance from the camera where the far blur effect affects the rendering. - </member> - <member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled" default="false"> - If [code]true[/code], enables the depth-of-field far blur effect. This has a significant performance cost. Consider disabling it in scenes where there are no far away objects. - </member> - <member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition" default="5.0"> - The length of the transition between the no-blur area and far blur. - </member> - <member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance" default="2.0"> - Distance from the camera where the near blur effect affects the rendering. - </member> - <member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled" default="false"> - If [code]true[/code], enables the depth-of-field near blur effect. This has a significant performance cost. Consider disabling it in scenes where there are no nearby objects. - </member> - <member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition" default="1.0"> - The length of the transition between the near blur and no-blur area. - </member> - <member name="override_exposure" type="float" setter="set_override_exposure" getter="get_override_exposure" default="1.0"> - The exposure override value to use. Higher values will result in a brighter scene. Only effective if [member override_exposure_enabled] is [code]true[/code]. - </member> - <member name="override_exposure_enabled" type="bool" setter="set_override_exposure_enabled" getter="is_override_exposure_enabled" default="false"> - If [code]true[/code], overrides the manual or automatic exposure defined in the [Environment] with the value in [member override_exposure]. - </member> - </members> -</class> diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml index ae9add995b..20b9dafd0d 100644 --- a/doc/classes/Curve.xml +++ b/doc/classes/Curve.xml @@ -74,27 +74,27 @@ Returns the right tangent angle (in degrees) for the point at [param index]. </description> </method> - <method name="interpolate" qualifiers="const"> + <method name="remove_point"> + <return type="void" /> + <param index="0" name="index" type="int" /> + <description> + Removes the point at [code]index[/code] from the curve. + </description> + </method> + <method name="sample" qualifiers="const"> <return type="float" /> <param index="0" name="offset" type="float" /> <description> Returns the Y value for the point that would exist at the X position [param offset] along the curve. </description> </method> - <method name="interpolate_baked" qualifiers="const"> + <method name="sample_baked" qualifiers="const"> <return type="float" /> <param index="0" name="offset" type="float" /> <description> Returns the Y value for the point that would exist at the X position [param offset] along the curve using the baked cache. Bakes the curve's points if not already baked. </description> </method> - <method name="remove_point"> - <return type="void" /> - <param index="0" name="index" type="int" /> - <description> - Removes the point at [param index] from the curve. - </description> - </method> <method name="set_point_left_mode"> <return type="void" /> <param index="0" name="index" type="int" /> diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml index f15c0d74ca..cc4124d084 100644 --- a/doc/classes/Curve2D.xml +++ b/doc/classes/Curve2D.xml @@ -43,7 +43,7 @@ <return type="float" /> <param index="0" name="to_point" type="Vector2" /> <description> - Returns the closest offset to [param to_point]. This offset is meant to be used in [method interpolate_baked]. + Returns the closest offset to [param to_point]. This offset is meant to be used in [method sample_baked]. [param to_point] must be in this curve's local space. </description> </method> @@ -76,7 +76,14 @@ Returns the position of the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code]. </description> </method> - <method name="interpolate" qualifiers="const"> + <method name="remove_point"> + <return type="void" /> + <param index="0" name="idx" type="int" /> + <description> + Deletes the point [code]idx[/code] from the curve. Sends an error to the console if [code]idx[/code] is out of bounds. + </description> + </method> + <method name="sample" qualifiers="const"> <return type="Vector2" /> <param index="0" name="idx" type="int" /> <param index="1" name="t" type="float" /> @@ -85,7 +92,7 @@ If [param idx] is out of bounds it is truncated to the first or last vertex, and [param t] is ignored. If the curve has no points, the function sends an error to the console, and returns [code](0, 0)[/code]. </description> </method> - <method name="interpolate_baked" qualifiers="const"> + <method name="sample_baked" qualifiers="const"> <return type="Vector2" /> <param index="0" name="offset" type="float" /> <param index="1" name="cubic" type="bool" default="false" /> @@ -95,18 +102,11 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). </description> </method> - <method name="interpolatef" qualifiers="const"> + <method name="samplef" qualifiers="const"> <return type="Vector2" /> <param index="0" name="fofs" type="float" /> <description> - Returns the position at the vertex [param fofs]. It calls [method interpolate] using the integer part of [param fofs] as [code]idx[/code], and its fractional part as [code]t[/code]. - </description> - </method> - <method name="remove_point"> - <return type="void" /> - <param index="0" name="idx" type="int" /> - <description> - Deletes the point [param idx] from the curve. Sends an error to the console if [param idx] is out of bounds. + Returns the position at the vertex [param fofs]. It calls [method sample] using the integer part of [param fofs] as [code]idx[/code], and its fractional part as [code]t[/code]. </description> </method> <method name="set_point_in"> diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index 0843453820..3e4e05f51a 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -56,7 +56,7 @@ <return type="float" /> <param index="0" name="to_point" type="Vector3" /> <description> - Returns the closest offset to [param to_point]. This offset is meant to be used in [method interpolate_baked] or [method interpolate_baked_up_vector]. + Returns the closest offset to [param to_point]. This offset is meant to be used in [method sample_baked] or [method sample_baked_up_vector]. [param to_point] must be in this curve's local space. </description> </method> @@ -96,7 +96,14 @@ Returns the tilt angle in radians for the point [param idx]. If the index is out of bounds, the function sends an error to the console, and returns [code]0[/code]. </description> </method> - <method name="interpolate" qualifiers="const"> + <method name="remove_point"> + <return type="void" /> + <param index="0" name="idx" type="int" /> + <description> + Deletes the point [code]idx[/code] from the curve. Sends an error to the console if [code]idx[/code] is out of bounds. + </description> + </method> + <method name="sample" qualifiers="const"> <return type="Vector3" /> <param index="0" name="idx" type="int" /> <param index="1" name="t" type="float" /> @@ -105,7 +112,7 @@ If [param idx] is out of bounds it is truncated to the first or last vertex, and [param t] is ignored. If the curve has no points, the function sends an error to the console, and returns [code](0, 0, 0)[/code]. </description> </method> - <method name="interpolate_baked" qualifiers="const"> + <method name="sample_baked" qualifiers="const"> <return type="Vector3" /> <param index="0" name="offset" type="float" /> <param index="1" name="cubic" type="bool" default="false" /> @@ -115,7 +122,7 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). </description> </method> - <method name="interpolate_baked_up_vector" qualifiers="const"> + <method name="sample_baked_up_vector" qualifiers="const"> <return type="Vector3" /> <param index="0" name="offset" type="float" /> <param index="1" name="apply_tilt" type="bool" default="false" /> @@ -125,18 +132,11 @@ If the curve has no up vectors, the function sends an error to the console, and returns [code](0, 1, 0)[/code]. </description> </method> - <method name="interpolatef" qualifiers="const"> + <method name="samplef" qualifiers="const"> <return type="Vector3" /> <param index="0" name="fofs" type="float" /> <description> - Returns the position at the vertex [param fofs]. It calls [method interpolate] using the integer part of [param fofs] as [code]idx[/code], and its fractional part as [code]t[/code]. - </description> - </method> - <method name="remove_point"> - <return type="void" /> - <param index="0" name="idx" type="int" /> - <description> - Deletes the point [param idx] from the curve. Sends an error to the console if [param idx] is out of bounds. + Returns the position at the vertex [param fofs]. It calls [method sample] using the integer part of [param fofs] as [code]idx[/code], and its fractional part as [code]t[/code]. </description> </method> <method name="set_point_in"> diff --git a/doc/classes/EditorVCSInterface.xml b/doc/classes/EditorVCSInterface.xml index 89ba79f7d9..cca6a0591f 100644 --- a/doc/classes/EditorVCSInterface.xml +++ b/doc/classes/EditorVCSInterface.xml @@ -1,97 +1,276 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorVCSInterface" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - Version Control System (VCS) interface which reads and writes to the local VCS in use. + Version Control System (VCS) interface, which reads and writes to the local VCS in use. </brief_description> <description> - Used by the editor to display VCS extracted information in the editor. The implementation of this API is included in VCS addons, which are essentially GDExtension plugins that need to be put into the project folder. These VCS addons are scripts which are attached (on demand) to the object instance of [code]EditorVCSInterface[/code]. All the functions listed below, instead of performing the task themselves, they call the internally defined functions in the VCS addons to provide a plug-n-play experience. + Defines the API that the editor uses to extract information from the underlying VCS. The implementation of this API is included in VCS plugins, which are GDExtension plugins that inherit [EditorVCSInterface] and are attached (on demand) to the singleton instance of [EditorVCSInterface]. Instead of performing the task themselves, all the virtual functions listed below are calling the internally overridden functions in the VCS plugins to provide a plug-n-play experience. A custom VCS plugin is supposed to inherit from [EditorVCSInterface] and override each of these virtual functions. </description> <tutorials> </tutorials> <methods> - <method name="commit"> + <method name="_checkout_branch" qualifiers="virtual"> + <return type="bool" /> + <param index="0" name="branch_name" type="String" /> + <description> + Checks out a [code]branch_name[/code] in the VCS. + </description> + </method> + <method name="_commit" qualifiers="virtual"> <return type="void" /> <param index="0" name="msg" type="String" /> <description> - Creates a version commit if the addon is initialized, else returns without doing anything. Uses the files which have been staged previously, with the commit message set to a value as provided as in the argument. + Commits the currently staged changes and applies the commit [code]msg[/code] to the resulting commit. </description> </method> - <method name="get_file_diff"> - <return type="Dictionary[]" /> + <method name="_create_branch" qualifiers="virtual"> + <return type="void" /> + <param index="0" name="branch_name" type="String" /> + <description> + Creates a new branch named [code]branch_name[/code] in the VCS. + </description> + </method> + <method name="_create_remote" qualifiers="virtual"> + <return type="void" /> + <param index="0" name="remote_name" type="String" /> + <param index="1" name="remote_url" type="String" /> + <description> + Creates a new remote destination with name [code]remote_name[/code] and points it to [code]remote_url[/code]. This can be an HTTPS remote or an SSH remote. + </description> + </method> + <method name="_discard_file" qualifiers="virtual"> + <return type="void" /> <param index="0" name="file_path" type="String" /> <description> - Returns an [Array] of [Dictionary] objects containing the diff output from the VCS in use, if a VCS addon is initialized, else returns an empty [Array] object. The diff contents also consist of some contextual lines which provide context to the observed line change in the file. - Each [Dictionary] object has the line diff contents under the keys: - - [code]"content"[/code] to store a [String] containing the line contents - - [code]"status"[/code] to store a [String] which contains [code]"+"[/code] in case the content is a line addition but it stores a [code]"-"[/code] in case of deletion and an empty string in the case the line content is neither an addition nor a deletion. - - [code]"new_line_number"[/code] to store an integer containing the new line number of the line content. - - [code]"line_count"[/code] to store an integer containing the number of lines in the line content. - - [code]"old_line_number"[/code] to store an integer containing the old line number of the line content. - - [code]"offset"[/code] to store the offset of the line change since the first contextual line content. + Discards the changes made in a file present at [code]file_path[/code]. </description> </method> - <method name="get_modified_files_data"> - <return type="Dictionary" /> + <method name="_fetch" qualifiers="virtual"> + <return type="void" /> + <param index="0" name="remote" type="String" /> <description> - Returns a [Dictionary] containing the path of the detected file change mapped to an integer signifying what kind of change the corresponding file has experienced. - The following integer values are being used to signify that the detected file is: - - [code]0[/code]: New to the VCS working directory - - [code]1[/code]: Modified - - [code]2[/code]: Renamed - - [code]3[/code]: Deleted - - [code]4[/code]: Typechanged + Fetches new changes from the remote, but doesn't write changes to the current working directory. Equivalent to [code]git fetch[/code]. </description> </method> - <method name="get_project_name"> + <method name="_get_branch_list" qualifiers="virtual"> + <return type="Array" /> + <description> + Gets an instance of an [Array] of [String]s containing available branch names in the VCS. + </description> + </method> + <method name="_get_current_branch_name" qualifiers="virtual"> <return type="String" /> <description> - Returns the project name of the VCS working directory. + Gets the current branch name defined in the VCS. + </description> + </method> + <method name="_get_diff" qualifiers="virtual"> + <return type="Dictionary[]" /> + <param index="0" name="identifier" type="String" /> + <param index="1" name="area" type="int" /> + <description> + Returns an array of [Dictionary] items (see [method create_diff_file], [method create_diff_hunk], [method create_diff_line], [method add_line_diffs_into_diff_hunk] and [method add_diff_hunks_into_diff_file]), each containing information about a diff. If [code]identifier[/code] is a file path, returns a file diff, and if it is a commit identifier, then returns a commit diff. + </description> + </method> + <method name="_get_line_diff" qualifiers="virtual"> + <return type="Array" /> + <param index="0" name="file_path" type="String" /> + <param index="1" name="text" type="String" /> + <description> + Returns an [Array] of [Dictionary] items (see [method create_diff_hunk]), each containing a line diff between a file at [code]file_path[/code] and the [code]text[/code] which is passed in. + </description> + </method> + <method name="_get_modified_files_data" qualifiers="virtual"> + <return type="Array" /> + <description> + Returns an [Array] of [Dictionary] items (see [method create_status_file]), each containing the status data of every modified file in the project folder. + </description> + </method> + <method name="_get_previous_commits" qualifiers="virtual"> + <return type="Array" /> + <param index="0" name="max_commits" type="int" /> + <description> + Returns an [Array] of [Dictionary] items (see [method create_commit]), each containing the data for a past commit. </description> </method> - <method name="get_vcs_name"> + <method name="_get_remotes" qualifiers="virtual"> + <return type="Array" /> + <description> + Returns an [Array] of [String]s, each containing the name of a remote configured in the VCS. + </description> + </method> + <method name="_get_vcs_name" qualifiers="virtual"> <return type="String" /> <description> - Returns the name of the VCS if the VCS has been initialized, else return an empty string. + Returns the name of the underlying VCS provider. </description> </method> - <method name="initialize"> + <method name="_initialize" qualifiers="virtual"> <return type="bool" /> - <param index="0" name="project_root_path" type="String" /> + <param index="0" name="project_path" type="String" /> <description> - Initializes the VCS addon if not already. Uses the argument value as the path to the working directory of the project. Creates the initial commit if required. Returns [code]true[/code] if no failure occurs, else returns [code]false[/code]. + Initializes the VCS plugin when called from the editor. Returns whether or not the plugin was successfully initialized. A VCS project is initialized at [code]project_path[/code]. </description> </method> - <method name="is_addon_ready"> - <return type="bool" /> + <method name="_pull" qualifiers="virtual"> + <return type="void" /> + <param index="0" name="remote" type="String" /> <description> - Returns [code]true[/code] if the addon is ready to respond to function calls, else returns [code]false[/code]. + Pulls changes from the remote. This can give rise to merge conflicts. </description> </method> - <method name="is_vcs_initialized"> - <return type="bool" /> + <method name="_push" qualifiers="virtual"> + <return type="void" /> + <param index="0" name="remote" type="String" /> + <param index="1" name="force" type="bool" /> + <description> + Pushes changes to the [code]remote[/code]. Optionally, if [code]force[/code] is set to true, a force push will override the change history already present on the remote. + </description> + </method> + <method name="_remove_branch" qualifiers="virtual"> + <return type="void" /> + <param index="0" name="branch_name" type="String" /> <description> - Returns [code]true[/code] if the VCS addon has been initialized, else returns [code]false[/code]. + Remove a branch from the local VCS. </description> </method> - <method name="shut_down"> + <method name="_remove_remote" qualifiers="virtual"> + <return type="void" /> + <param index="0" name="remote_name" type="String" /> + <description> + Remove a remote from the local VCS. + </description> + </method> + <method name="_set_credentials" qualifiers="virtual"> + <return type="void" /> + <param index="0" name="username" type="String" /> + <param index="1" name="password" type="String" /> + <param index="2" name="ssh_public_key_path" type="String" /> + <param index="3" name="ssh_private_key_path" type="String" /> + <param index="4" name="ssh_passphrase" type="String" /> + <description> + Set user credentials in the underlying VCS. [code]username[/code] and [code]password[/code] are used only during HTTPS authentication unless not already mentioned in the remote URL. [code]ssh_public_key_path[/code], [code]ssh_private_key_path[/code], and [code]ssh_passphrase[/code] are only used during SSH authentication. + </description> + </method> + <method name="_shut_down" qualifiers="virtual"> <return type="bool" /> <description> - Shuts down the VCS addon to allow cleanup code to run on call. Returns [code]true[/code] is no failure occurs, else returns [code]false[/code]. + Shuts down VCS plugin instance. Called when the user either closes the editor or shuts down the VCS plugin through the editor UI. </description> </method> - <method name="stage_file"> + <method name="_stage_file" qualifiers="virtual"> <return type="void" /> <param index="0" name="file_path" type="String" /> <description> - Stages the file which should be committed when [method EditorVCSInterface.commit] is called. Argument should contain the absolute path. + Stages the file present at [code]file_path[/code] to the staged area. </description> </method> - <method name="unstage_file"> + <method name="_unstage_file" qualifiers="virtual"> <return type="void" /> <param index="0" name="file_path" type="String" /> <description> - Unstages the file which was staged previously to be committed, so that it is no longer committed when [method EditorVCSInterface.commit] is called. Argument should contain the absolute path. + Unstages the file present at [code]file_path[/code] from the staged area to the unstaged area. + </description> + </method> + <method name="add_diff_hunks_into_diff_file"> + <return type="Dictionary" /> + <param index="0" name="diff_file" type="Dictionary" /> + <param index="1" name="diff_hunks" type="Array" /> + <description> + Helper function to add an array of [code]diff_hunks[/code] into a [code]diff_file[/code]. + </description> + </method> + <method name="add_line_diffs_into_diff_hunk"> + <return type="Dictionary" /> + <param index="0" name="diff_hunk" type="Dictionary" /> + <param index="1" name="line_diffs" type="Array" /> + <description> + Helper function to add an array of [code]line_diffs[/code] into a [code]diff_hunk[/code]. + </description> + </method> + <method name="create_commit"> + <return type="Dictionary" /> + <param index="0" name="msg" type="String" /> + <param index="1" name="author" type="String" /> + <param index="2" name="id" type="String" /> + <param index="3" name="unix_timestamp" type="int" /> + <param index="4" name="offset_minutes" type="int" /> + <description> + Helper function to create a commit [Dictionary] item. [code]msg[/code] is the commit message of the commit. [code]author[/code] is a single human-readable string containing all the author's details, e.g. the email and name configured in the VCS. [code]id[/code] is the identifier of the commit, in whichever format your VCS may provide an identifier to commits. [code]unix_timestamp[/code] is the UTC Unix timestamp of when the commit was created. [code]offset_minutes[/code] is the timezone offset in minutes, recorded from the system timezone where the commit was created. + </description> + </method> + <method name="create_diff_file"> + <return type="Dictionary" /> + <param index="0" name="new_file" type="String" /> + <param index="1" name="old_file" type="String" /> + <description> + Helper function to create a [code]Dictionary[/code] for storing old and new diff file paths. + </description> + </method> + <method name="create_diff_hunk"> + <return type="Dictionary" /> + <param index="0" name="old_start" type="int" /> + <param index="1" name="new_start" type="int" /> + <param index="2" name="old_lines" type="int" /> + <param index="3" name="new_lines" type="int" /> + <description> + Helper function to create a [code]Dictionary[/code] for storing diff hunk data. [code]old_start[/code] is the starting line number in old file. [code]new_start[/code] is the starting line number in new file. [code]old_lines[/code] is the number of lines in the old file. [code]new_lines[/code] is the number of lines in the new file. + </description> + </method> + <method name="create_diff_line"> + <return type="Dictionary" /> + <param index="0" name="new_line_no" type="int" /> + <param index="1" name="old_line_no" type="int" /> + <param index="2" name="content" type="String" /> + <param index="3" name="status" type="String" /> + <description> + Helper function to create a [code]Dictionary[/code] for storing a line diff. [code]new_line_no[/code] is the line number in the new file (can be [code]-1[/code] if the line is deleted). [code]old_line_no[/code] is the line number in the old file (can be [code]-1[/code] if the line is added). [code]content[/code] is the diff text. [code]status[/code] is a single character string which stores the line origin. + </description> + </method> + <method name="create_status_file"> + <return type="Dictionary" /> + <param index="0" name="file_path" type="String" /> + <param index="1" name="change_type" type="int" enum="EditorVCSInterface.ChangeType" /> + <param index="2" name="area" type="int" enum="EditorVCSInterface.TreeArea" /> + <description> + Helper function to create a [code]Dictionary[/code] used by editor to read the status of a file. + </description> + </method> + <method name="popup_error"> + <return type="void" /> + <param index="0" name="msg" type="String" /> + <description> + Pops up an error message in the edior which is shown as coming from the underlying VCS. Use this to show VCS specific error messages. </description> </method> </methods> + <constants> + <constant name="CHANGE_TYPE_NEW" value="0" enum="ChangeType"> + A new file has been added. + </constant> + <constant name="CHANGE_TYPE_MODIFIED" value="1" enum="ChangeType"> + An earlier added file has been modified. + </constant> + <constant name="CHANGE_TYPE_RENAMED" value="2" enum="ChangeType"> + An earlier added file has been renamed. + </constant> + <constant name="CHANGE_TYPE_DELETED" value="3" enum="ChangeType"> + An earlier added file has been deleted. + </constant> + <constant name="CHANGE_TYPE_TYPECHANGE" value="4" enum="ChangeType"> + An earlier added file has been typechanged. + </constant> + <constant name="CHANGE_TYPE_UNMERGED" value="5" enum="ChangeType"> + A file is left unmerged. + </constant> + <constant name="TREE_AREA_COMMIT" value="0" enum="TreeArea"> + A commit is encountered from the commit area. + </constant> + <constant name="TREE_AREA_STAGED" value="1" enum="TreeArea"> + A file is encountered from the staged area. + </constant> + <constant name="TREE_AREA_UNSTAGED" value="2" enum="TreeArea"> + A file is encountered from the unstaged area. + </constant> + </constants> </class> diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 864dbd423a..0182d543e1 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -63,21 +63,6 @@ <member name="ambient_light_source" type="int" setter="set_ambient_source" getter="get_ambient_source" enum="Environment.AmbientSource" default="0"> The ambient light source to use for rendering materials and global illumination. </member> - <member name="auto_exposure_enabled" type="bool" setter="set_tonemap_auto_exposure_enabled" getter="is_tonemap_auto_exposure_enabled" default="false"> - If [code]true[/code], enables the tonemapping auto exposure mode of the scene renderer. If [code]true[/code], the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light. - </member> - <member name="auto_exposure_max_luma" type="float" setter="set_tonemap_auto_exposure_max" getter="get_tonemap_auto_exposure_max" default="8.0"> - The maximum luminance value for the auto exposure. - </member> - <member name="auto_exposure_min_luma" type="float" setter="set_tonemap_auto_exposure_min" getter="get_tonemap_auto_exposure_min" default="0.05"> - The minimum luminance value for the auto exposure. - </member> - <member name="auto_exposure_scale" type="float" setter="set_tonemap_auto_exposure_grey" getter="get_tonemap_auto_exposure_grey" default="0.4"> - The scale of the auto exposure effect. Affects the intensity of auto exposure. - </member> - <member name="auto_exposure_speed" type="float" setter="set_tonemap_auto_exposure_speed" getter="get_tonemap_auto_exposure_speed" default="0.5"> - The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. - </member> <member name="background_camera_feed_id" type="int" setter="set_camera_feed_id" getter="get_camera_feed_id" default="1"> The ID of the camera feed to show in the background. </member> @@ -87,8 +72,11 @@ <member name="background_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color(0, 0, 0, 1)"> The [Color] displayed for clear areas of the scene. Only effective when using the [constant BG_COLOR] background mode. </member> - <member name="background_energy" type="float" setter="set_bg_energy" getter="get_bg_energy" default="1.0"> - The power of the light emitted by the background. + <member name="background_energy_multiplier" type="float" setter="set_bg_energy_multiplier" getter="get_bg_energy_multiplier" default="1.0"> + Multiplier for background energy. Increase to make background brighter, decrease to make background dimmer. + </member> + <member name="background_intensity" type="float" setter="set_bg_intensity" getter="get_bg_intensity" default="30000.0"> + Luminance of background measured in nits (candela per square meter). Only used when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled. The default value is roughly equivalent to the sky at midday. </member> <member name="background_mode" type="int" setter="set_background" getter="get_background" enum="Environment.BGMode" default="0"> The background mode. See [enum BGMode] for possible values. diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml index f081174b67..33f0a7979a 100644 --- a/doc/classes/Gradient.xml +++ b/doc/classes/Gradient.xml @@ -38,13 +38,6 @@ Returns the number of colors in the gradient. </description> </method> - <method name="interpolate"> - <return type="Color" /> - <param index="0" name="offset" type="float" /> - <description> - Returns the interpolated color specified by [param offset]. - </description> - </method> <method name="remove_point"> <return type="void" /> <param index="0" name="point" type="int" /> @@ -58,6 +51,13 @@ Reverses/mirrors the gradient. </description> </method> + <method name="sample"> + <return type="Color" /> + <param index="0" name="offset" type="float" /> + <description> + Returns the interpolated color specified by [code]offset[/code]. + </description> + </method> <method name="set_color"> <return type="void" /> <param index="0" name="point" type="int" /> diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml index 80ff83ec46..e9ebbc0a41 100644 --- a/doc/classes/Light3D.xml +++ b/doc/classes/Light3D.xml @@ -11,6 +11,12 @@ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> + <method name="get_correlated_color" qualifiers="const"> + <return type="Color" /> + <description> + Returns the [Color] of an idealized blackbody at the given [member light_temperature]. This value is calculated internally based on the [member light_temperature]. This [Color] is multiplied by [member light_color] before being sent to the [RenderingServer]. + </description> + </method> <method name="get_param" qualifiers="const"> <return type="float" /> <param index="0" name="param" type="int" enum="Light3D.Param" /> @@ -67,6 +73,15 @@ Secondary multiplier used with indirect light (light bounces). Used with [VoxelGI] and SDFGI (see [member Environment.sdfgi_enabled]). [b]Note:[/b] This property is ignored if [member light_energy] is equal to [code]0.0[/code], as the light won't be present at all in the GI shader. </member> + <member name="light_intensity_lumens" type="float" setter="set_param" getter="get_param"> + Used by positional lights ([OmniLight3D] and [SpotLight3D]) when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is [code]true[/code]. Sets the intensity of the light source measured in Lumens. Lumens are a measure of luminous flux, which is the total amount of visible light emitted by a light source per unit of time. + For [SpotLight3D]s, we assume that the area outside the visible cone is surrounded by a perfect light absorbing material. Accordingly, the apparent brightness of the cone area does not change as the cone increases and decreases in size. + A typical household lightbulb can range from around 600 lumens to 1,200 lumens, a candle is about 13 lumens, while a streetlight can be approximately 60,000 lumens. + </member> + <member name="light_intensity_lux" type="float" setter="set_param" getter="get_param"> + Used by [DirectionalLight3D]s when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is [code]true[/code]. Sets the intensity of the light source measured in Lux. Lux is a measure pf luminous flux per unit area, it is equal to one lumen per square metre. Lux is the measure of how much light hits a surface at a given time. + On a clear sunny day a surface in direct sunlight may be approximately 100,000 lux, a typical room in a home may be approximately 50 lux, while the moonlit ground may be approximately 0.1 lux. + </member> <member name="light_negative" type="bool" setter="set_negative" getter="is_negative" default="false"> If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows. </member> @@ -80,6 +95,14 @@ <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. When not baking emission, this can be used to avoid unrealistic reflections when placing lights above an emissive surface. </member> + <member name="light_temperature" type="float" setter="set_temperature" getter="get_temperature"> + Sets the color temperature of the light source, measured in Kelvin. This is used to calculate a correlated color temperature which tints the [member light_color]. + The sun on a cloudy day is approximately 6500 Kelvin, on a clear day it is between 5500 to 6000 Kelvin, and on a clear day at sunrise or sunset it ranges to around 1850 Kelvin. + </member> + <member name="light_volumetric_fog_energy" type="float" setter="set_param" getter="get_param" default="1.0"> + Secondary multiplier multiplied with [member light_energy] then used with the [Environment]'s volumetric fog (if enabled). If set to [code]0.0[/code], computing volumetric fog will be skipped for this light, which can improve performance for large amounts of lights when volumetric fog is enabled. + [b]Note:[/b] To prevent short-lived dynamic light effects from poorly interacting with volumetric fog, lights used in those effects should have [member light_volumetric_fog_energy] set to [code]0.0[/code] unless [member Environment.volumetric_fog_temporal_reprojection_enabled] is disabled (or unless the reprojection amount is significantly lowered). + </member> <member name="shadow_bias" type="float" setter="set_param" getter="get_param" default="0.1"> 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> @@ -89,8 +112,6 @@ <member name="shadow_enabled" type="bool" setter="set_shadow" getter="has_shadow" default="false"> If [code]true[/code], the light will cast real-time shadows. This has a significant performance cost. Only enable shadow rendering when it makes a noticeable difference in the scene's appearance, and consider using [member distance_fade_enabled] to hide the light when far away from the [Camera3D]. </member> - <member name="shadow_fog_fade" type="float" setter="set_param" getter="get_param" default="0.1"> - </member> <member name="shadow_normal_bias" type="float" setter="set_param" getter="get_param" default="1.0"> Offsets the lookup into the shadow map by the object's normal. This can be used to reduce self-shadowing artifacts without using [member shadow_bias]. In practice, this value should be tweaked along with [member shadow_bias] to reduce artifacts as much as possible. </member> @@ -110,61 +131,64 @@ <constant name="PARAM_INDIRECT_ENERGY" value="1" enum="Param"> Constant for accessing [member light_indirect_energy]. </constant> - <constant name="PARAM_SPECULAR" value="2" enum="Param"> + <constant name="PARAM_VOLUMETRIC_FOG_ENERGY" value="2" enum="Param"> + Constant for accessing [member light_volumetric_fog_energy]. + </constant> + <constant name="PARAM_SPECULAR" value="3" enum="Param"> Constant for accessing [member light_specular]. </constant> - <constant name="PARAM_RANGE" value="3" enum="Param"> + <constant name="PARAM_RANGE" value="4" enum="Param"> Constant for accessing [member OmniLight3D.omni_range] or [member SpotLight3D.spot_range]. </constant> - <constant name="PARAM_SIZE" value="4" enum="Param"> + <constant name="PARAM_SIZE" value="5" enum="Param"> Constant for accessing [member light_size]. </constant> - <constant name="PARAM_ATTENUATION" value="5" enum="Param"> + <constant name="PARAM_ATTENUATION" value="6" enum="Param"> Constant for accessing [member OmniLight3D.omni_attenuation] or [member SpotLight3D.spot_attenuation]. </constant> - <constant name="PARAM_SPOT_ANGLE" value="6" enum="Param"> + <constant name="PARAM_SPOT_ANGLE" value="7" enum="Param"> Constant for accessing [member SpotLight3D.spot_angle]. </constant> - <constant name="PARAM_SPOT_ATTENUATION" value="7" enum="Param"> + <constant name="PARAM_SPOT_ATTENUATION" value="8" enum="Param"> Constant for accessing [member SpotLight3D.spot_angle_attenuation]. </constant> - <constant name="PARAM_SHADOW_MAX_DISTANCE" value="8" enum="Param"> + <constant name="PARAM_SHADOW_MAX_DISTANCE" value="9" enum="Param"> Constant for accessing [member DirectionalLight3D.directional_shadow_max_distance]. </constant> - <constant name="PARAM_SHADOW_SPLIT_1_OFFSET" value="9" enum="Param"> + <constant name="PARAM_SHADOW_SPLIT_1_OFFSET" value="10" enum="Param"> Constant for accessing [member DirectionalLight3D.directional_shadow_split_1]. </constant> - <constant name="PARAM_SHADOW_SPLIT_2_OFFSET" value="10" enum="Param"> + <constant name="PARAM_SHADOW_SPLIT_2_OFFSET" value="11" enum="Param"> Constant for accessing [member DirectionalLight3D.directional_shadow_split_2]. </constant> - <constant name="PARAM_SHADOW_SPLIT_3_OFFSET" value="11" enum="Param"> + <constant name="PARAM_SHADOW_SPLIT_3_OFFSET" value="12" enum="Param"> Constant for accessing [member DirectionalLight3D.directional_shadow_split_3]. </constant> - <constant name="PARAM_SHADOW_FADE_START" value="12" enum="Param"> + <constant name="PARAM_SHADOW_FADE_START" value="13" enum="Param"> Constant for accessing [member DirectionalLight3D.directional_shadow_fade_start]. </constant> - <constant name="PARAM_SHADOW_NORMAL_BIAS" value="13" enum="Param"> + <constant name="PARAM_SHADOW_NORMAL_BIAS" value="14" enum="Param"> Constant for accessing [member shadow_normal_bias]. </constant> - <constant name="PARAM_SHADOW_BIAS" value="14" enum="Param"> + <constant name="PARAM_SHADOW_BIAS" value="15" enum="Param"> Constant for accessing [member shadow_bias]. </constant> - <constant name="PARAM_SHADOW_PANCAKE_SIZE" value="15" enum="Param"> + <constant name="PARAM_SHADOW_PANCAKE_SIZE" value="16" enum="Param"> Constant for accessing [member DirectionalLight3D.directional_shadow_pancake_size]. </constant> - <constant name="PARAM_SHADOW_OPACITY" value="16" enum="Param"> + <constant name="PARAM_SHADOW_OPACITY" value="17" enum="Param"> Constant for accessing [member shadow_opacity]. </constant> - <constant name="PARAM_SHADOW_BLUR" value="17" enum="Param"> + <constant name="PARAM_SHADOW_BLUR" value="18" enum="Param"> Constant for accessing [member shadow_blur]. </constant> - <constant name="PARAM_SHADOW_VOLUMETRIC_FOG_FADE" value="18" enum="Param"> - Constant for accessing [member shadow_fog_fade]. - </constant> <constant name="PARAM_TRANSMITTANCE_BIAS" value="19" enum="Param"> Constant for accessing [member shadow_transmittance_bias]. </constant> - <constant name="PARAM_MAX" value="20" enum="Param"> + <constant name="PARAM_INTENSITY" value="20" enum="Param"> + Constant for accessing [member light_intensity_lumens] and [member light_intensity_lux]. Only used when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is [code]true[/code]. + </constant> + <constant name="PARAM_MAX" value="21" enum="Param"> Represents the size of the [enum Param] enum. </constant> <constant name="BAKE_DISABLED" value="0" enum="BakeMode"> diff --git a/doc/classes/LightmapGI.xml b/doc/classes/LightmapGI.xml index c0766cd1ec..dd8c7be489 100644 --- a/doc/classes/LightmapGI.xml +++ b/doc/classes/LightmapGI.xml @@ -20,6 +20,9 @@ <member name="bounces" type="int" setter="set_bounces" getter="get_bounces" default="1"> Number of light bounces that are taken into account during baking. Higher values result in brighter, more realistic lighting, at the cost of longer bake times. If set to [code]0[/code], only environment lighting, direct light and emissive lighting is baked. </member> + <member name="camera_attributes" type="CameraAttributes" setter="set_camera_attributes" getter="get_camera_attributes"> + The [CameraAttributes] resource that specifies exposure levels to bake at. Auto-exposure and non exposure properties will be ignored. Exposure settings should be used to reduce the dynamic range present when baking. If exposure is too high, the [LightmapGI] will have banding artifacts or may have over-exposure artifacts. + </member> <member name="directional" type="bool" setter="set_directional" getter="is_directional" default="false"> If [code]true[/code], bakes lightmaps to contain directional information as spherical harmonics. This results in more realistic lighting appearance, especially with normal mapped materials and for lights that have their direct light baked ([member Light3D.light_bake_mode] set to [constant Light3D.BAKE_STATIC]). The directional information is also used to provide rough reflections for static and dynamic objects. This has a small run-time performance cost as the shader has to perform more work to interpret the direction information from the lightmap. Directional lightmaps also take longer to bake and result in larger file sizes. [b]Note:[/b] The property's name has no relationship with [DirectionalLight3D]. [member directional] works with all light types. diff --git a/doc/classes/PhysicalSkyMaterial.xml b/doc/classes/PhysicalSkyMaterial.xml index 7c2ea088c8..9d303d80e5 100644 --- a/doc/classes/PhysicalSkyMaterial.xml +++ b/doc/classes/PhysicalSkyMaterial.xml @@ -11,8 +11,7 @@ <tutorials> </tutorials> <members> - <member name="exposure" type="float" setter="set_exposure" getter="get_exposure" default="0.1"> - Sets the exposure of the sky. Higher exposure values make the entire sky brighter. + <member name="energy_multiplier" type="float" setter="set_energy_multiplier" getter="get_energy_multiplier" default="1.0"> </member> <member name="ground_color" type="Color" setter="set_ground_color" getter="get_ground_color" default="Color(0.1, 0.07, 0.034, 1)"> Modulates the [Color] on the bottom half of the sky to represent the ground. diff --git a/doc/classes/ProceduralSkyMaterial.xml b/doc/classes/ProceduralSkyMaterial.xml index 3cc4bd71f7..6ba8e57380 100644 --- a/doc/classes/ProceduralSkyMaterial.xml +++ b/doc/classes/ProceduralSkyMaterial.xml @@ -17,14 +17,14 @@ <member name="ground_curve" type="float" setter="set_ground_curve" getter="get_ground_curve" default="0.02"> How quickly the [member ground_horizon_color] fades into the [member ground_bottom_color]. </member> - <member name="ground_energy" type="float" setter="set_ground_energy" getter="get_ground_energy" default="1.0"> - Amount of energy contribution from the ground. + <member name="ground_energy_multiplier" type="float" setter="set_ground_energy_multiplier" getter="get_ground_energy_multiplier" default="1.0"> + Multiplier for ground color. A higher value will make the ground brighter. </member> <member name="ground_horizon_color" type="Color" setter="set_ground_horizon_color" getter="get_ground_horizon_color" default="Color(0.6463, 0.6558, 0.6708, 1)"> Color of the ground at the horizon. Blends with [member ground_bottom_color]. </member> <member name="sky_cover" type="Texture2D" setter="set_sky_cover" getter="get_sky_cover"> - The sky cover texture to use. This texture must use an equirectangular projection (similar to [PanoramaSkyMaterial]). The texture's colors will be [i]added[/i] to the existing sky color, and will be multiplied by [member sky_energy] and [member sky_cover_modulate]. This is mainly suited to displaying stars at night, but it can also be used to display clouds at day or night (with a non-physically-accurate look). + The sky cover texture to use. This texture must use an equirectangular projection (similar to [PanoramaSkyMaterial]). The texture's colors will be [i]added[/i] to the existing sky color, and will be multiplied by [member sky_energy_multiplier] and [member sky_cover_modulate]. This is mainly suited to displaying stars at night, but it can also be used to display clouds at day or night (with a non-physically-accurate look). </member> <member name="sky_cover_modulate" type="Color" setter="set_sky_cover_modulate" getter="get_sky_cover_modulate" default="Color(1, 1, 1, 1)"> The tint to apply to the [member sky_cover] texture. This can be used to change the sky cover's colors or opacity independently of the sky energy, which is useful for day/night or weather transitions. Only effective if a texture is defined in [member sky_cover]. @@ -32,8 +32,8 @@ <member name="sky_curve" type="float" setter="set_sky_curve" getter="get_sky_curve" default="0.15"> How quickly the [member sky_horizon_color] fades into the [member sky_top_color]. </member> - <member name="sky_energy" type="float" setter="set_sky_energy" getter="get_sky_energy" default="1.0"> - Amount of energy contribution from the sky. + <member name="sky_energy_multiplier" type="float" setter="set_sky_energy_multiplier" getter="get_sky_energy_multiplier" default="1.0"> + Multiplier for sky color. A higher value will make the sky brighter. </member> <member name="sky_horizon_color" type="Color" setter="set_sky_horizon_color" getter="get_sky_horizon_color" default="Color(0.6463, 0.6558, 0.6708, 1)"> Color of the sky at the horizon. Blends with [member sky_top_color]. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index e8e8ca3725..ffafff0ff4 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1807,6 +1807,55 @@ <member name="rendering/lightmapping/probe_capture/update_speed" type="float" setter="" getter="" default="15"> The framerate-independent update speed when representing dynamic object lighting from [LightmapProbe]s. Higher values make dynamic object lighting update faster. Higher values can prevent fast-moving objects from having "outdated" indirect lighting displayed on them, at the cost of possible flickering when an object moves from a bright area to a shaded area. </member> + <member name="rendering/lights_and_shadows/directional_shadow/16_bits" type="bool" setter="" getter="" default="true"> + Use 16 bits for shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices. + </member> + <member name="rendering/lights_and_shadows/directional_shadow/size" type="int" setter="" getter="" default="4096"> + The directional shadow's size in pixels. Higher values will result in sharper shadows, at the cost of performance. The value will be rounded up to the nearest power of 2. + </member> + <member name="rendering/lights_and_shadows/directional_shadow/size.mobile" type="int" setter="" getter="" default="2048"> + Lower-end override for [member rendering/lights_and_shadows/directional_shadow/size] on mobile devices, due to performance concerns or driver support. + </member> + <member name="rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality" type="int" setter="" getter="" default="2"> + Quality setting for shadows cast by [DirectionalLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy. + [b]Note:[/b] The Soft Very Low setting will automatically multiply [i]constant[/i] shadow blur by 0.75x to reduce the amount of noise visible. This automatic blur change only affects the constant blur factor defined in [member Light3D.shadow_blur], not the variable blur performed by [DirectionalLight3D]s' [member Light3D.light_angular_distance]. + [b]Note:[/b] The Soft High and Soft Ultra settings will automatically multiply [i]constant[/i] shadow blur by 1.5× and 2× respectively to make better use of the increased sample count. This increased blur also improves stability of dynamic object shadows. + </member> + <member name="rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality.mobile" type="int" setter="" getter="" default="0"> + Lower-end override for [member rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality] on mobile devices, due to performance concerns or driver support. + </member> + <member name="rendering/lights_and_shadows/positional_shadow/atlas_16_bits" type="bool" setter="" getter="" default="true"> + Use 16 bits for shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices. + </member> + <member name="rendering/lights_and_shadows/positional_shadow/atlas_quadrant_0_subdiv" type="int" setter="" getter="" default="2"> + Subdivision quadrant size for shadow mapping. See shadow mapping documentation. + </member> + <member name="rendering/lights_and_shadows/positional_shadow/atlas_quadrant_1_subdiv" type="int" setter="" getter="" default="2"> + Subdivision quadrant size for shadow mapping. See shadow mapping documentation. + </member> + <member name="rendering/lights_and_shadows/positional_shadow/atlas_quadrant_2_subdiv" type="int" setter="" getter="" default="3"> + Subdivision quadrant size for shadow mapping. See shadow mapping documentation. + </member> + <member name="rendering/lights_and_shadows/positional_shadow/atlas_quadrant_3_subdiv" type="int" setter="" getter="" default="4"> + Subdivision quadrant size for shadow mapping. See shadow mapping documentation. + </member> + <member name="rendering/lights_and_shadows/positional_shadow/atlas_size" type="int" setter="" getter="" default="4096"> + Size for shadow atlas (used for OmniLights and SpotLights). See documentation. + </member> + <member name="rendering/lights_and_shadows/positional_shadow/atlas_size.mobile" type="int" setter="" getter="" default="2048"> + Lower-end override for [member rendering/lights_and_shadows/positional_shadow/atlas_size] on mobile devices, due to performance concerns or driver support. + </member> + <member name="rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality" type="int" setter="" getter="" default="2"> + Quality setting for shadows cast by [OmniLight3D]s and [SpotLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy. + [b]Note:[/b] The Soft Very Low setting will automatically multiply [i]constant[/i] shadow blur by 0.75x to reduce the amount of noise visible. This automatic blur change only affects the constant blur factor defined in [member Light3D.shadow_blur], not the variable blur performed by [DirectionalLight3D]s' [member Light3D.light_angular_distance]. + [b]Note:[/b] The Soft High and Soft Ultra settings will automatically multiply shadow blur by 1.5× and 2× respectively to make better use of the increased sample count. This increased blur also improves stability of dynamic object shadows. + </member> + <member name="rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality.mobile" type="int" setter="" getter="" default="0"> + Lower-end override for [member rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality] on mobile devices, due to performance concerns or driver support. + </member> + <member name="rendering/lights_and_shadows/use_physical_light_units" type="bool" setter="" getter="" default="false"> + Enables the use of physically based units for light sources. Physically based units tend to be much larger than the arbitrary units used by Godot, but they can be used to match lighting within Godot to real-world lighting. Due to the large dynamic range of lighting conditions present in nature, Godot bakes exposure into the various lighting quantities before rendering. Most light sources bake exposure automatically at run time based on the active [CameraAttributes] resource, but [LightmapGI] and [VoxelGI] require a [CameraAttributes] resource to be set at bake time to reduce the dynamic range. At run time, Godot will automatically reconcile the baked exposure with the active exposure to ensure lighting remains consistent. + </member> <member name="rendering/limits/cluster_builder/max_clustered_elements" type="float" setter="" getter="" default="512"> </member> <member name="rendering/limits/forward_renderer/threaded_render_minimum_instances" type="int" setter="" getter="" default="500"> @@ -1901,50 +1950,6 @@ <member name="rendering/shading/overrides/force_vertex_shading.mobile" type="bool" setter="" getter="" default="true"> Lower-end override for [member rendering/shading/overrides/force_vertex_shading] on mobile devices, due to performance concerns or driver support. </member> - <member name="rendering/shadows/directional_shadow/16_bits" type="bool" setter="" getter="" default="true"> - </member> - <member name="rendering/shadows/directional_shadow/size" type="int" setter="" getter="" default="4096"> - The directional shadow's size in pixels. Higher values will result in sharper shadows, at the cost of performance. The value will be rounded up to the nearest power of 2. - </member> - <member name="rendering/shadows/directional_shadow/size.mobile" type="int" setter="" getter="" default="2048"> - Lower-end override for [member rendering/shadows/directional_shadow/size] on mobile devices, due to performance concerns or driver support. - </member> - <member name="rendering/shadows/directional_shadow/soft_shadow_filter_quality" type="int" setter="" getter="" default="2"> - Quality setting for shadows cast by [DirectionalLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy. - [b]Note:[/b] The Soft Very Low setting will automatically multiply [i]constant[/i] shadow blur by 0.75x to reduce the amount of noise visible. This automatic blur change only affects the constant blur factor defined in [member Light3D.shadow_blur], not the variable blur performed by [DirectionalLight3D]s' [member Light3D.light_angular_distance]. - [b]Note:[/b] The Soft High and Soft Ultra settings will automatically multiply [i]constant[/i] shadow blur by 1.5× and 2× respectively to make better use of the increased sample count. This increased blur also improves stability of dynamic object shadows. - </member> - <member name="rendering/shadows/directional_shadow/soft_shadow_filter_quality.mobile" type="int" setter="" getter="" default="0"> - Lower-end override for [member rendering/shadows/directional_shadow/soft_shadow_filter_quality] on mobile devices, due to performance concerns or driver support. - </member> - <member name="rendering/shadows/positional_shadow/atlas_16_bits" type="bool" setter="" getter="" default="true"> - </member> - <member name="rendering/shadows/positional_shadow/atlas_quadrant_0_subdiv" type="int" setter="" getter="" default="2"> - Subdivision quadrant size for shadow mapping. See shadow mapping documentation. - </member> - <member name="rendering/shadows/positional_shadow/atlas_quadrant_1_subdiv" type="int" setter="" getter="" default="2"> - Subdivision quadrant size for shadow mapping. See shadow mapping documentation. - </member> - <member name="rendering/shadows/positional_shadow/atlas_quadrant_2_subdiv" type="int" setter="" getter="" default="3"> - Subdivision quadrant size for shadow mapping. See shadow mapping documentation. - </member> - <member name="rendering/shadows/positional_shadow/atlas_quadrant_3_subdiv" type="int" setter="" getter="" default="4"> - Subdivision quadrant size for shadow mapping. See shadow mapping documentation. - </member> - <member name="rendering/shadows/positional_shadow/atlas_size" type="int" setter="" getter="" default="4096"> - Size for shadow atlas (used for OmniLights and SpotLights). See documentation. - </member> - <member name="rendering/shadows/positional_shadow/atlas_size.mobile" type="int" setter="" getter="" default="2048"> - Lower-end override for [member rendering/shadows/positional_shadow/atlas_size] on mobile devices, due to performance concerns or driver support. - </member> - <member name="rendering/shadows/positional_shadow/soft_shadow_filter_quality" type="int" setter="" getter="" default="2"> - Quality setting for shadows cast by [OmniLight3D]s and [SpotLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy. - [b]Note:[/b] The Soft Very Low setting will automatically multiply [i]constant[/i] shadow blur by 0.75x to reduce the amount of noise visible. This automatic blur change only affects the constant blur factor defined in [member Light3D.shadow_blur], not the variable blur performed by [DirectionalLight3D]s' [member Light3D.light_angular_distance]. - [b]Note:[/b] The Soft High and Soft Ultra settings will automatically multiply shadow blur by 1.5× and 2× respectively to make better use of the increased sample count. This increased blur also improves stability of dynamic object shadows. - </member> - <member name="rendering/shadows/positional_shadow/soft_shadow_filter_quality.mobile" type="int" setter="" getter="" default="0"> - Lower-end override for [member rendering/shadows/positional_shadow/soft_shadow_filter_quality] on mobile devices, due to performance concerns or driver support. - </member> <member name="rendering/textures/decals/filter" type="int" setter="" getter="" default="3"> The filtering quality to use for [Decal] nodes. When using one of the anisotropic filtering modes, the anisotropic filtering level is controlled by [member rendering/textures/default_filters/anisotropic_filtering_level]. </member> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 755e8a5839..1366099e75 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -26,29 +26,27 @@ <description> </description> </method> - <method name="camera_create"> + <method name="camera_attributes_create"> <return type="RID" /> <description> - Creates a camera and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_*[/code] RenderingServer functions. + Creates a camera attributes object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_attributes_[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> - <method name="camera_effects_create"> - <return type="RID" /> - <description> - </description> - </method> - <method name="camera_effects_set_custom_exposure"> + <method name="camera_attributes_set_auto_exposure"> <return type="void" /> - <param index="0" name="camera_effects" type="RID" /> + <param index="0" name="camera_attributes" type="RID" /> <param index="1" name="enable" type="bool" /> - <param index="2" name="exposure" type="float" /> + <param index="2" name="min_sensitivity" type="float" /> + <param index="3" name="max_sensitivity" type="float" /> + <param index="4" name="speed" type="float" /> + <param index="5" name="scale" type="float" /> <description> </description> </method> - <method name="camera_effects_set_dof_blur"> + <method name="camera_attributes_set_dof_blur"> <return type="void" /> - <param index="0" name="camera_effects" type="RID" /> + <param index="0" name="camera_attributes" type="RID" /> <param index="1" name="far_enable" type="bool" /> <param index="2" name="far_distance" type="float" /> <param index="3" name="far_transition" type="float" /> @@ -59,20 +57,46 @@ <description> </description> </method> - <method name="camera_effects_set_dof_blur_bokeh_shape"> + <method name="camera_attributes_set_dof_blur_bokeh_shape"> <return type="void" /> <param index="0" name="shape" type="int" enum="RenderingServer.DOFBokehShape" /> <description> </description> </method> - <method name="camera_effects_set_dof_blur_quality"> + <method name="camera_attributes_set_dof_blur_quality"> <return type="void" /> <param index="0" name="quality" type="int" enum="RenderingServer.DOFBlurQuality" /> <param index="1" name="use_jitter" type="bool" /> <description> </description> </method> - <method name="camera_set_camera_effects"> + <method name="camera_attributes_set_exposure"> + <return type="void" /> + <param index="0" name="camera_attributes" type="RID" /> + <param index="1" name="multiplier" type="float" /> + <param index="2" name="normalization" type="float" /> + <description> + Sets the exposure values that will be used by the renderers. The normalization amount is used to bake a given Exposure Value (EV) into rendering calculations to reduce the dynamic range of the scene. + The normalization factor can be calculated from exposure value (EV100) as follows: + [codeblock] + func get_exposure_normalization(float ev100): + return 1.0 / (pow(2.0, ev100) * 1.2) + [/codeblock] + The exposure value can be calculated from aperture (in f-stops), shutter speed (in seconds), and sensitivity (in ISO) as follows: + [codeblock] + func get_exposure(float aperture, float shutter_speed, float sensitivity): + return log2((aperture * aperture) / shutterSpeed * (100.0 / sensitivity)) + [/codeblock] + </description> + </method> + <method name="camera_create"> + <return type="RID" /> + <description> + Creates a camera and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + </description> + </method> + <method name="camera_set_camera_attributes"> <return type="void" /> <param index="0" name="camera" type="RID" /> <param index="1" name="effects" type="RID" /> @@ -976,7 +1000,8 @@ <method name="environment_set_bg_energy"> <return type="void" /> <param index="0" name="env" type="RID" /> - <param index="1" name="energy" type="float" /> + <param index="1" name="multiplier" type="float" /> + <param index="2" name="exposure_value" type="float" /> <description> Sets the intensity of the background color. </description> @@ -1143,11 +1168,6 @@ <param index="1" name="tone_mapper" type="int" enum="RenderingServer.EnvironmentToneMapper" /> <param index="2" name="exposure" type="float" /> <param index="3" name="white" type="float" /> - <param index="4" name="auto_exposure" type="bool" /> - <param index="5" name="min_luminance" type="float" /> - <param index="6" name="max_luminance" type="float" /> - <param index="7" name="auto_exp_speed" type="float" /> - <param index="8" name="auto_exp_grey" type="float" /> <description> Sets the variables to be used with the "tonemap" post-process effect. See [Environment] for more details. </description> @@ -1767,6 +1787,14 @@ <description> </description> </method> + <method name="lightmap_set_baked_exposure_normalization"> + <return type="void" /> + <param index="0" name="lightmap" type="RID" /> + <param index="1" name="baked_exposure" type="float" /> + <description> + Used to inform the renderer what exposure normalization value was used while baking the lightmap. This value will be used and modulated at run time to ensure that the lightmap maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see [method camera_attributes_set_exposure]. + </description> + </method> <method name="lightmap_set_probe_bounds"> <return type="void" /> <param index="0" name="lightmap" type="RID" /> @@ -2665,7 +2693,7 @@ The scenario is the 3D world that all the visual instances exist in. </description> </method> - <method name="scenario_set_camera_effects"> + <method name="scenario_set_camera_attributes"> <return type="void" /> <param index="0" name="scenario" type="RID" /> <param index="1" name="effects" type="RID" /> @@ -3480,6 +3508,14 @@ <description> </description> </method> + <method name="voxel_gi_set_baked_exposure_normalization"> + <return type="void" /> + <param index="0" name="voxel_gi" type="RID" /> + <param index="1" name="baked_exposure" type="float" /> + <description> + Used to inform the renderer what exposure normalization value was used while baking the voxel gi. This value will be used and modulated at run time to ensure that the voxel gi maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see [method camera_attributes_set_exposure]. + </description> + </method> <method name="voxel_gi_set_bias"> <return type="void" /> <param index="0" name="voxel_gi" type="RID" /> @@ -3792,64 +3828,65 @@ Is a spot light. </constant> <constant name="LIGHT_PARAM_ENERGY" value="0" enum="LightParam"> - The light's energy. + The light's energy multiplier. </constant> <constant name="LIGHT_PARAM_INDIRECT_ENERGY" value="1" enum="LightParam"> The light's indirect energy multiplier (final indirect energy is [constant LIGHT_PARAM_ENERGY] * [constant LIGHT_PARAM_INDIRECT_ENERGY]). </constant> - <constant name="LIGHT_PARAM_SPECULAR" value="2" enum="LightParam"> + <constant name="LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY" value="2" enum="LightParam"> + The light's volumetric fog energy multiplier (final volumetric fog energy is [constant LIGHT_PARAM_ENERGY] * [constant LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY]). + </constant> + <constant name="LIGHT_PARAM_SPECULAR" value="3" enum="LightParam"> The light's influence on specularity. </constant> - <constant name="LIGHT_PARAM_RANGE" value="3" enum="LightParam"> + <constant name="LIGHT_PARAM_RANGE" value="4" enum="LightParam"> The light's range. </constant> - <constant name="LIGHT_PARAM_SIZE" value="4" enum="LightParam"> + <constant name="LIGHT_PARAM_SIZE" value="5" enum="LightParam"> The size of the light when using spot light or omni light. The angular size of the light when using directional light. </constant> - <constant name="LIGHT_PARAM_ATTENUATION" value="5" enum="LightParam"> + <constant name="LIGHT_PARAM_ATTENUATION" value="6" enum="LightParam"> The light's attenuation. </constant> - <constant name="LIGHT_PARAM_SPOT_ANGLE" value="6" enum="LightParam"> + <constant name="LIGHT_PARAM_SPOT_ANGLE" value="7" enum="LightParam"> The spotlight's angle. </constant> - <constant name="LIGHT_PARAM_SPOT_ATTENUATION" value="7" enum="LightParam"> + <constant name="LIGHT_PARAM_SPOT_ATTENUATION" value="8" enum="LightParam"> The spotlight's attenuation. </constant> - <constant name="LIGHT_PARAM_SHADOW_MAX_DISTANCE" value="8" enum="LightParam"> + <constant name="LIGHT_PARAM_SHADOW_MAX_DISTANCE" value="9" enum="LightParam"> Max distance that shadows will be rendered. </constant> - <constant name="LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET" value="9" enum="LightParam"> + <constant name="LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET" value="10" enum="LightParam"> Proportion of shadow atlas occupied by the first split. </constant> - <constant name="LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET" value="10" enum="LightParam"> + <constant name="LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET" value="11" enum="LightParam"> Proportion of shadow atlas occupied by the second split. </constant> - <constant name="LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET" value="11" enum="LightParam"> + <constant name="LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET" value="12" enum="LightParam"> Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest. </constant> - <constant name="LIGHT_PARAM_SHADOW_FADE_START" value="12" enum="LightParam"> + <constant name="LIGHT_PARAM_SHADOW_FADE_START" value="13" enum="LightParam"> Proportion of shadow max distance where the shadow will start to fade out. </constant> - <constant name="LIGHT_PARAM_SHADOW_NORMAL_BIAS" value="13" enum="LightParam"> + <constant name="LIGHT_PARAM_SHADOW_NORMAL_BIAS" value="14" enum="LightParam"> Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts. </constant> - <constant name="LIGHT_PARAM_SHADOW_BIAS" value="14" enum="LightParam"> + <constant name="LIGHT_PARAM_SHADOW_BIAS" value="15" enum="LightParam"> Bias the shadow lookup to fix self-shadowing artifacts. </constant> - <constant name="LIGHT_PARAM_SHADOW_PANCAKE_SIZE" value="15" enum="LightParam"> + <constant name="LIGHT_PARAM_SHADOW_PANCAKE_SIZE" value="16" enum="LightParam"> Sets the size of the directional shadow pancake. The pancake offsets the start of the shadow's camera frustum to provide a higher effective depth resolution for the shadow. However, a high pancake size can cause artifacts in the shadows of large objects that are close to the edge of the frustum. Reducing the pancake size can help. Setting the size to [code]0[/code] turns off the pancaking effect. </constant> - <constant name="LIGHT_PARAM_SHADOW_OPACITY" value="16" enum="LightParam"> + <constant name="LIGHT_PARAM_SHADOW_OPACITY" value="17" enum="LightParam"> The light's shadow opacity. Values lower than [code]1.0[/code] make the light appear through shadows. This can be used to fake global illumination at a low performance cost. </constant> - <constant name="LIGHT_PARAM_SHADOW_BLUR" value="17" enum="LightParam"> + <constant name="LIGHT_PARAM_SHADOW_BLUR" value="18" enum="LightParam"> Blurs the edges of the shadow. Can be used to hide pixel artifacts in low resolution shadow maps. A high value can make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible. </constant> - <constant name="LIGHT_PARAM_SHADOW_VOLUMETRIC_FOG_FADE" value="18" enum="LightParam"> - </constant> <constant name="LIGHT_PARAM_TRANSMITTANCE_BIAS" value="19" enum="LightParam"> </constant> - <constant name="LIGHT_PARAM_MAX" value="20" enum="LightParam"> + <constant name="LIGHT_PARAM_MAX" value="21" enum="LightParam"> Represents the size of the [enum LightParam] enum. </constant> <constant name="LIGHT_BAKE_DISABLED" value="0" enum="LightBakeMode"> diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index aad83211f5..1aec6d2c0e 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -1624,6 +1624,10 @@ Break the line between any unconnected graphemes. </constant> <constant name="BREAK_ADAPTIVE" value="8" enum="LineBreakFlag" is_bitfield="true"> + Should be used only in conjunction with [constant BREAK_WORD_BOUND], break the line between any unconnected graphemes, if it's impossible to break it between the words. + </constant> + <constant name="BREAK_TRIM_EDGE_SPACES" value="16" enum="LineBreakFlag" is_bitfield="true"> + Remove edge spaces from the broken line segments. </constant> <constant name="VC_CHARS_BEFORE_SHAPING" value="0" enum="VisibleCharactersBehavior"> Trims text before the shaping. e.g, increasing [member Label.visible_characters] or [member RichTextLabel.visible_characters] value is visually identical to typing the text. diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml index 14aa72b80c..18b4f9e6f9 100644 --- a/doc/classes/Transform3D.xml +++ b/doc/classes/Transform3D.xml @@ -141,14 +141,6 @@ This can be seen as transforming with respect to the local frame. </description> </method> - <method name="spherical_interpolate_with" qualifiers="const"> - <return type="Transform3D" /> - <param index="0" name="xform" type="Transform3D" /> - <param index="1" name="weight" type="float" /> - <description> - Returns a transform spherically interpolated between this transform and another by a given [param weight] (on the range of 0.0 to 1.0). - </description> - </method> <method name="translated" qualifiers="const"> <return type="Transform3D" /> <param index="0" name="offset" type="Vector3" /> diff --git a/doc/classes/VoxelGI.xml b/doc/classes/VoxelGI.xml index ba4995a5fb..394611b78f 100644 --- a/doc/classes/VoxelGI.xml +++ b/doc/classes/VoxelGI.xml @@ -32,6 +32,9 @@ </method> </methods> <members> + <member name="camera_attributes" type="CameraAttributes" setter="set_camera_attributes" getter="get_camera_attributes"> + The [CameraAttributes] resource that specifies exposure levels to bake at. Auto-exposure and non exposure properties will be ignored. Exposure settings should be used to reduce the dynamic range present when baking. If exposure is too high, the [VoxelGI] will have banding artifacts or may have over-exposure artifacts. + </member> <member name="data" type="VoxelGIData" setter="set_probe_data" getter="get_probe_data"> The [VoxelGIData] resource that holds the data for this [VoxelGI]. </member> diff --git a/doc/classes/World3D.xml b/doc/classes/World3D.xml index 56a662d062..f3c7136075 100644 --- a/doc/classes/World3D.xml +++ b/doc/classes/World3D.xml @@ -10,7 +10,8 @@ <link title="Ray-casting">$DOCS_URL/tutorials/physics/ray-casting.html</link> </tutorials> <members> - <member name="camera_effects" type="CameraEffects" setter="set_camera_effects" getter="get_camera_effects"> + <member name="camera_attributes" type="CameraAttributes" setter="set_camera_attributes" getter="get_camera_attributes"> + The default [CameraAttributes] resource to use if none set on the [Camera3D]. </member> <member name="direct_space_state" type="PhysicsDirectSpaceState3D" setter="" getter="get_direct_space_state"> Direct access to the world's physics 3D space state. Used for querying current and potential collisions. diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml index ed8f0b9a04..5255179bb8 100644 --- a/doc/classes/WorldEnvironment.xml +++ b/doc/classes/WorldEnvironment.xml @@ -15,8 +15,8 @@ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <members> - <member name="camera_effects" type="CameraEffects" setter="set_camera_effects" getter="get_camera_effects"> - The [CameraEffects] resource used by this [WorldEnvironment], defining the default properties. This [CameraEffects] resource will be used by all [Camera3D]s that do not define their own [CameraEffects]. + <member name="camera_attributes" type="CameraAttributes" setter="set_camera_attributes" getter="get_camera_attributes"> + The default [CameraAttributes] resource to use if none set on the [Camera3D]. </member> <member name="environment" type="Environment" setter="set_environment" getter="get_environment"> The [Environment] resource used by this [WorldEnvironment], defining the default properties. |