diff options
Diffstat (limited to 'doc/classes')
| -rw-r--r-- | doc/classes/@GlobalScope.xml | 5 | ||||
| -rw-r--r-- | doc/classes/AABB.xml | 6 | ||||
| -rw-r--r-- | doc/classes/AnimationMixer.xml | 44 | ||||
| -rw-r--r-- | doc/classes/AnimationNodeTimeSeek.xml | 5 | ||||
| -rw-r--r-- | doc/classes/CollisionShape3D.xml | 6 | ||||
| -rw-r--r-- | doc/classes/Control.xml | 2 | ||||
| -rw-r--r-- | doc/classes/FileAccess.xml | 13 | ||||
| -rw-r--r-- | doc/classes/LookAtModifier3D.xml | 4 | ||||
| -rw-r--r-- | doc/classes/OS.xml | 1 | ||||
| -rw-r--r-- | doc/classes/PackedInt64Array.xml | 2 | ||||
| -rw-r--r-- | doc/classes/PackedVector4Array.xml | 1 | ||||
| -rw-r--r-- | doc/classes/Projection.xml | 12 | ||||
| -rw-r--r-- | doc/classes/StreamPeer.xml | 13 | ||||
| -rw-r--r-- | doc/classes/Vector2.xml | 4 | ||||
| -rw-r--r-- | doc/classes/Vector2i.xml | 4 | ||||
| -rw-r--r-- | doc/classes/Vector3.xml | 6 | ||||
| -rw-r--r-- | doc/classes/Vector3i.xml | 6 | ||||
| -rw-r--r-- | doc/classes/Vector4.xml | 8 | ||||
| -rw-r--r-- | doc/classes/Vector4i.xml | 8 | ||||
| -rw-r--r-- | doc/classes/VisualShaderNodeColorFunc.xml | 27 |
20 files changed, 130 insertions, 47 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 1721134d08..06aec6a2f7 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -2941,7 +2941,10 @@ [/codeblock] [b]Note:[/b] A [Callable] cannot be properly serialized and stored in a file, so it is recommended to use [constant PROPERTY_USAGE_EDITOR] instead of [constant PROPERTY_USAGE_DEFAULT]. </constant> - <constant name="PROPERTY_HINT_MAX" value="40" enum="PropertyHint"> + <constant name="PROPERTY_HINT_ONESHOT" value="40" enum="PropertyHint"> + Hints that a property will be changed on its own after setting, such as [member AudioStreamPlayer.playing] or [member GPUParticles3D.emitting]. + </constant> + <constant name="PROPERTY_HINT_MAX" value="41" enum="PropertyHint"> Represents the size of the [enum PropertyHint] enum. </constant> <constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags" is_bitfield="true"> diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml index ae2de055cb..57ac241eb2 100644 --- a/doc/classes/AABB.xml +++ b/doc/classes/AABB.xml @@ -345,14 +345,14 @@ </methods> <members> <member name="end" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)"> - The ending point. This is usually the corner on the top-right and forward of the bounding box, and is equivalent to [code]position + size[/code]. Setting this point affects the [member size]. + The ending point. This is usually the corner on the top-right and back of the bounding box, and is equivalent to [code]position + size[/code]. Setting this point affects the [member size]. </member> <member name="position" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)"> - The origin point. This is usually the corner on the bottom-left and back of the bounding box. + The origin point. This is usually the corner on the bottom-left and forward of the bounding box. </member> <member name="size" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)"> The bounding box's width, height, and depth starting from [member position]. Setting this value also affects the [member end] point. - [b]Note:[/b] It's recommended setting the width, height, and depth to non-negative values. This is because most methods in Godot assume that the [member position] is the bottom-left-back corner, and the [member end] is the top-right-forward corner. To get an equivalent bounding box with non-negative size, use [method abs]. + [b]Note:[/b] It's recommended setting the width, height, and depth to non-negative values. This is because most methods in Godot assume that the [member position] is the bottom-left-forward corner, and the [member end] is the top-right-back corner. To get an equivalent bounding box with non-negative size, use [method abs]. </member> </members> <operators> diff --git a/doc/classes/AnimationMixer.xml b/doc/classes/AnimationMixer.xml index d762ffa5a6..36cb675776 100644 --- a/doc/classes/AnimationMixer.xml +++ b/doc/classes/AnimationMixer.xml @@ -112,13 +112,13 @@ The most basic example is applying position to [CharacterBody3D]: [codeblocks] [gdscript] - var current_rotation: Quaternion + var current_rotation func _process(delta): if Input.is_action_just_pressed("animate"): current_rotation = get_quaternion() state_machine.travel("Animate") - var velocity: Vector3 = current_rotation * animation_tree.get_root_motion_position() / delta + var velocity = current_rotation * animation_tree.get_root_motion_position() / delta set_velocity(velocity) move_and_slide() [/gdscript] @@ -130,7 +130,20 @@ if Input.is_action_just_pressed("animate"): state_machine.travel("Animate") set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation()) - var velocity: Vector3 = (animation_tree.get_root_motion_rotation_accumulator().inverse() * get_quaternion()) * animation_tree.get_root_motion_position() / delta + var velocity = (animation_tree.get_root_motion_rotation_accumulator().inverse() * get_quaternion()) * animation_tree.get_root_motion_position() / delta + set_velocity(velocity) + move_and_slide() + [/gdscript] + [/codeblocks] + If [member root_motion_local] is [code]true[/code], return the pre-multiplied translation value with the inverted rotation. + In this case, the code can be written as follows: + [codeblocks] + [gdscript] + func _process(delta): + if Input.is_action_just_pressed("animate"): + state_machine.travel("Animate") + set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation()) + var velocity = get_quaternion() * animation_tree.get_root_motion_position() / delta set_velocity(velocity) move_and_slide() [/gdscript] @@ -145,13 +158,13 @@ For example, if an animation with only one key [code]Vector3(0, 0, 0)[/code] is played in the previous frame and then an animation with only one key [code]Vector3(1, 0, 1)[/code] is played in the next frame, the difference can be calculated as follows: [codeblocks] [gdscript] - var prev_root_motion_position_accumulator: Vector3 + var prev_root_motion_position_accumulator func _process(delta): if Input.is_action_just_pressed("animate"): state_machine.travel("Animate") - var current_root_motion_position_accumulator: Vector3 = animation_tree.get_root_motion_position_accumulator() - var difference: Vector3 = current_root_motion_position_accumulator - prev_root_motion_position_accumulator + var current_root_motion_position_accumulator = animation_tree.get_root_motion_position_accumulator() + var difference = current_root_motion_position_accumulator - prev_root_motion_position_accumulator prev_root_motion_position_accumulator = current_root_motion_position_accumulator transform.origin += difference [/gdscript] @@ -185,13 +198,13 @@ For example, if an animation with only one key [code]Quaternion(0, 0, 0, 1)[/code] is played in the previous frame and then an animation with only one key [code]Quaternion(0, 0.707, 0, 0.707)[/code] is played in the next frame, the difference can be calculated as follows: [codeblocks] [gdscript] - var prev_root_motion_rotation_accumulator: Quaternion + var prev_root_motion_rotation_accumulator func _process(delta): if Input.is_action_just_pressed("animate"): state_machine.travel("Animate") - var current_root_motion_rotation_accumulator: Quaternion = animation_tree.get_root_motion_rotation_accumulator() - var difference: Quaternion = prev_root_motion_rotation_accumulator.inverse() * current_root_motion_rotation_accumulator + var current_root_motion_rotation_accumulator = animation_tree.get_root_motion_rotation_accumulator() + var difference = prev_root_motion_rotation_accumulator.inverse() * current_root_motion_rotation_accumulator prev_root_motion_rotation_accumulator = current_root_motion_rotation_accumulator transform.basis *= Basis(difference) [/gdscript] @@ -208,8 +221,8 @@ The most basic example is applying scale to [CharacterBody3D]: [codeblocks] [gdscript] - var current_scale: Vector3 = Vector3(1, 1, 1) - var scale_accum: Vector3 = Vector3(1, 1, 1) + var current_scale = Vector3(1, 1, 1) + var scale_accum = Vector3(1, 1, 1) func _process(delta): if Input.is_action_just_pressed("animate"): @@ -229,13 +242,13 @@ For example, if an animation with only one key [code]Vector3(1, 1, 1)[/code] is played in the previous frame and then an animation with only one key [code]Vector3(2, 2, 2)[/code] is played in the next frame, the difference can be calculated as follows: [codeblocks] [gdscript] - var prev_root_motion_scale_accumulator: Vector3 + var prev_root_motion_scale_accumulator func _process(delta): if Input.is_action_just_pressed("animate"): state_machine.travel("Animate") - var current_root_motion_scale_accumulator: Vector3 = animation_tree.get_root_motion_scale_accumulator() - var difference: Vector3 = current_root_motion_scale_accumulator - prev_root_motion_scale_accumulator + var current_root_motion_scale_accumulator = animation_tree.get_root_motion_scale_accumulator() + var difference = current_root_motion_scale_accumulator - prev_root_motion_scale_accumulator prev_root_motion_scale_accumulator = current_root_motion_scale_accumulator transform.basis = transform.basis.scaled(difference) [/gdscript] @@ -304,6 +317,9 @@ This is used by the editor. If set to [code]true[/code], the scene will be saved with the effects of the reset animation (the animation with the key [code]"RESET"[/code]) applied as if it had been seeked to time 0, with the editor keeping the values that the scene had before saving. This makes it more convenient to preview and edit animations in the editor, as changes to the scene will not be saved as long as they are set in the reset animation. </member> + <member name="root_motion_local" type="bool" setter="set_root_motion_local" getter="is_root_motion_local"> + If [code]true[/code], [method get_root_motion_position] value is extracted as a local translation value before blending. In other words, it is treated like the translation is done after the rotation. + </member> <member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath("")"> The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. The [member root_motion_track] uses the same format as [method Animation.track_set_path], but note that a bone must be specified. If the track has type [constant Animation.TYPE_POSITION_3D], [constant Animation.TYPE_ROTATION_3D], or [constant Animation.TYPE_SCALE_3D] the transformation will be canceled visually, and the animation will appear to stay in place. See also [method get_root_motion_position], [method get_root_motion_rotation], [method get_root_motion_scale], and [RootMotionView]. diff --git a/doc/classes/AnimationNodeTimeSeek.xml b/doc/classes/AnimationNodeTimeSeek.xml index d00b3fca3a..865e94ec43 100644 --- a/doc/classes/AnimationNodeTimeSeek.xml +++ b/doc/classes/AnimationNodeTimeSeek.xml @@ -30,4 +30,9 @@ <tutorials> <link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link> </tutorials> + <members> + <member name="explicit_elapse" type="bool" setter="set_explicit_elapse" getter="is_explicit_elapse" default="true"> + If [code]true[/code], some processes are executed to handle keys between seeks, such as calculating root motion and finding the nearest discrete key. + </member> + </members> </class> diff --git a/doc/classes/CollisionShape3D.xml b/doc/classes/CollisionShape3D.xml index a4e0ed0b28..69a7dd2b36 100644 --- a/doc/classes/CollisionShape3D.xml +++ b/doc/classes/CollisionShape3D.xml @@ -29,6 +29,12 @@ </method> </methods> <members> + <member name="debug_color" type="Color" setter="set_debug_color" getter="get_debug_color" default="Color(0, 0, 0, 0)"> + The collision shape color that is displayed in the editor, or in the running project if [b]Debug > Visible Collision Shapes[/b] is checked at the top of the editor. If this is reset to its default value of [code]Color(0, 0, 0, 0)[/code], the value of [member ProjectSettings.debug/shapes/collision/shape_color] will be used instead. + </member> + <member name="debug_fill" type="bool" setter="set_enable_debug_fill" getter="get_enable_debug_fill" default="true"> + If [code]true[/code], when the shape is displayed, it will show a solid fill color in addition to its wireframe. + </member> <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false" keywords="enabled"> A disabled collision shape has no effect in the world. </member> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 342e20759e..d22be4a52d 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -12,7 +12,7 @@ Call [method accept_event] so no other node receives the event. Once you accept an input, it becomes handled so [method Node._unhandled_input] will not process it. Only one [Control] node can be in focus. Only the node in focus will receive events. To get the focus, call [method grab_focus]. [Control] nodes lose focus when another node grabs it, or if you hide the node in focus. Sets [member mouse_filter] to [constant MOUSE_FILTER_IGNORE] to tell a [Control] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button. - [Theme] resources change the Control's appearance. If you change the [Theme] on a [Control] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_theme_*_override[/code] methods, like [method add_theme_font_override]. You can override the theme with the Inspector. + [Theme] resources change the control's appearance. The [member theme] of a [Control] node affects all of its direct and indirect children (as long as a chain of controls is uninterrupted). To override some of the theme items, call one of the [code]add_theme_*_override[/code] methods, like [method add_theme_font_override]. You can also override theme items in the Inspector. [b]Note:[/b] Theme items are [i]not[/i] [Object] properties. This means you can't access their values using [method Object.get] and [method Object.set]. Instead, use the [code]get_theme_*[/code] and [code]add_theme_*_override[/code] methods provided by this class. </description> <tutorials> diff --git a/doc/classes/FileAccess.xml b/doc/classes/FileAccess.xml index d7ca8afc2c..846897a463 100644 --- a/doc/classes/FileAccess.xml +++ b/doc/classes/FileAccess.xml @@ -173,6 +173,12 @@ Returns the next 32 bits from the file as a floating-point number. </description> </method> + <method name="get_half" qualifiers="const"> + <return type="float" /> + <description> + Returns the next 16 bits from the file as a half-precision floating-point number. + </description> + </method> <method name="get_hidden_attribute" qualifiers="static"> <return type="bool" /> <param index="0" name="file" type="String" /> @@ -471,6 +477,13 @@ Stores a floating-point number as 32 bits in the file. </description> </method> + <method name="store_half"> + <return type="void" /> + <param index="0" name="value" type="float" /> + <description> + Stores a half-precision floating-point number as 16 bits in the file. + </description> + </method> <method name="store_line"> <return type="void" /> <param index="0" name="line" type="String" /> diff --git a/doc/classes/LookAtModifier3D.xml b/doc/classes/LookAtModifier3D.xml index a7f3935ee3..2475de1868 100644 --- a/doc/classes/LookAtModifier3D.xml +++ b/doc/classes/LookAtModifier3D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="LookAtModifier3D" inherits="SkeletonModifier3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - The [SkeletonModifier3D] rotates a bone to look a target. + The [LookAtModifier3D] rotates a bone to look at a target. </brief_description> <description> - This [SkeletonModifier3D] rotates a bone to look a target. This is helpful for moving character's head to look at the player, rotating a turret to look at a target, or any other case where you want to make a bone rotate towards something quickly and easily. + This [SkeletonModifier3D] rotates a bone to look at a target. This is helpful for moving a character's head to look at the player, rotating a turret to look at a target, or any other case where you want to make a bone rotate towards something quickly and easily. When applying multiple [LookAtModifier3D]s, the [LookAtModifier3D] assigned to the parent bone must be put above the [LookAtModifier3D] assigned to the child bone in the list in order for the child bone results to be correct. </description> <tutorials> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 5ab7c27f4f..2389db1301 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -721,6 +721,7 @@ - If standard input is console, this method will block until the program receives a line break in standard input (usually by the user pressing [kbd]Enter[/kbd]). - If standard input is pipe, this method will block until a specific amount of data is read or pipe is closed. - If standard input is a file, this method will read a specific amount of data (or less if end-of-file is reached) and return immediately. + [b]Note:[/b] This method automatically replaces [code]\r\n[/code] line breaks with [code]\n[/code] and removes them from the end of the string. Use [method read_buffer_from_stdin] to read the unprocessed data. [b]Note:[/b] This method is implemented on Linux, macOS, and Windows. [b]Note:[/b] On exported Windows builds, run the console wrapper executable to access the terminal. If standard input is console, calling this method without console wrapped will freeze permanently. If standard input is pipe or file, it can be used without console wrapper. If you need a single executable with full console support, use a custom build compiled with the [code]windows_subsystem=console[/code] flag. </description> diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml index cfaf012a55..b82d0de350 100644 --- a/doc/classes/PackedInt64Array.xml +++ b/doc/classes/PackedInt64Array.xml @@ -6,7 +6,7 @@ <description> An array specifically designed to hold 64-bit integer values. Packs data tightly, so it saves memory for large array sizes. [b]Note:[/b] This type stores signed 64-bit integers, which means it can take values in the interval [code][-2^63, 2^63 - 1][/code], i.e. [code][-9223372036854775808, 9223372036854775807][/code]. Exceeding those bounds will wrap around. If you only need to pack 32-bit integers tightly, see [PackedInt32Array] for a more memory-friendly alternative. - [b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedInt32Array] versus [code]Array[int][/code]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays. + [b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedInt64Array] versus [code]Array[int][/code]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays. [b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will [i]not[/i] affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. </description> <tutorials> diff --git a/doc/classes/PackedVector4Array.xml b/doc/classes/PackedVector4Array.xml index 6dbfc7413d..7bebee79c7 100644 --- a/doc/classes/PackedVector4Array.xml +++ b/doc/classes/PackedVector4Array.xml @@ -5,6 +5,7 @@ </brief_description> <description> An array specifically designed to hold [Vector4]. Packs data tightly, so it saves memory for large array sizes. + [b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedVector4Array] versus [code]Array[Vector4][/code]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays. [b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will [i]not[/i] affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. </description> <tutorials> diff --git a/doc/classes/Projection.xml b/doc/classes/Projection.xml index f781083abf..091e0bf54f 100644 --- a/doc/classes/Projection.xml +++ b/doc/classes/Projection.xml @@ -278,22 +278,22 @@ </member> </members> <constants> - <constant name="PLANE_NEAR" value="0"> + <constant name="PLANE_NEAR" value="0" enum="Planes"> The index value of the projection's near clipping plane. </constant> - <constant name="PLANE_FAR" value="1"> + <constant name="PLANE_FAR" value="1" enum="Planes"> The index value of the projection's far clipping plane. </constant> - <constant name="PLANE_LEFT" value="2"> + <constant name="PLANE_LEFT" value="2" enum="Planes"> The index value of the projection's left clipping plane. </constant> - <constant name="PLANE_TOP" value="3"> + <constant name="PLANE_TOP" value="3" enum="Planes"> The index value of the projection's top clipping plane. </constant> - <constant name="PLANE_RIGHT" value="4"> + <constant name="PLANE_RIGHT" value="4" enum="Planes"> The index value of the projection's right clipping plane. </constant> - <constant name="PLANE_BOTTOM" value="5"> + <constant name="PLANE_BOTTOM" value="5" enum="Planes"> The index value of the projection bottom clipping plane. </constant> <constant name="IDENTITY" value="Projection(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)"> diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml index ad5c5472b8..acff5cf604 100644 --- a/doc/classes/StreamPeer.xml +++ b/doc/classes/StreamPeer.xml @@ -59,6 +59,12 @@ Gets a single-precision float from the stream. </description> </method> + <method name="get_half"> + <return type="float" /> + <description> + Gets a half-precision float from the stream. + </description> + </method> <method name="get_partial_data"> <return type="Array" /> <param index="0" name="bytes" type="int" /> @@ -162,6 +168,13 @@ Puts a single-precision float into the stream. </description> </method> + <method name="put_half"> + <return type="void" /> + <param index="0" name="value" type="float" /> + <description> + Puts a half-precision float into the stream. + </description> + </method> <method name="put_partial_data"> <return type="Array" /> <param index="0" name="data" type="PackedByteArray" /> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 78183ae36c..c03262bb33 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -424,10 +424,10 @@ </member> </members> <constants> - <constant name="AXIS_X" value="0"> + <constant name="AXIS_X" value="0" enum="Axis"> Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> - <constant name="AXIS_Y" value="1"> + <constant name="AXIS_Y" value="1" enum="Axis"> Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> <constant name="ZERO" value="Vector2(0, 0)"> diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index 4afc62e038..53c7c92ca3 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -170,10 +170,10 @@ </member> </members> <constants> - <constant name="AXIS_X" value="0"> + <constant name="AXIS_X" value="0" enum="Axis"> Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> - <constant name="AXIS_Y" value="1"> + <constant name="AXIS_Y" value="1" enum="Axis"> Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> <constant name="ZERO" value="Vector2i(0, 0)"> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index c04fcd0b24..4ab3140eb6 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -421,13 +421,13 @@ </member> </members> <constants> - <constant name="AXIS_X" value="0"> + <constant name="AXIS_X" value="0" enum="Axis"> Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> - <constant name="AXIS_Y" value="1"> + <constant name="AXIS_Y" value="1" enum="Axis"> Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> - <constant name="AXIS_Z" value="2"> + <constant name="AXIS_Z" value="2" enum="Axis"> Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> <constant name="ZERO" value="Vector3(0, 0, 0)"> diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index df4624dbb1..7fe469aec0 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -168,13 +168,13 @@ </member> </members> <constants> - <constant name="AXIS_X" value="0"> + <constant name="AXIS_X" value="0" enum="Axis"> Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> - <constant name="AXIS_Y" value="1"> + <constant name="AXIS_Y" value="1" enum="Axis"> Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> - <constant name="AXIS_Z" value="2"> + <constant name="AXIS_Z" value="2" enum="Axis"> Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> <constant name="ZERO" value="Vector3i(0, 0, 0)"> diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml index f70c59fbef..8fa17b57e6 100644 --- a/doc/classes/Vector4.xml +++ b/doc/classes/Vector4.xml @@ -287,16 +287,16 @@ </member> </members> <constants> - <constant name="AXIS_X" value="0"> + <constant name="AXIS_X" value="0" enum="Axis"> Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> - <constant name="AXIS_Y" value="1"> + <constant name="AXIS_Y" value="1" enum="Axis"> Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> - <constant name="AXIS_Z" value="2"> + <constant name="AXIS_Z" value="2" enum="Axis"> Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> - <constant name="AXIS_W" value="3"> + <constant name="AXIS_W" value="3" enum="Axis"> Enumerated value for the W axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> <constant name="ZERO" value="Vector4(0, 0, 0, 0)"> diff --git a/doc/classes/Vector4i.xml b/doc/classes/Vector4i.xml index b351f2ccb6..e1d65eb1b5 100644 --- a/doc/classes/Vector4i.xml +++ b/doc/classes/Vector4i.xml @@ -169,16 +169,16 @@ </member> </members> <constants> - <constant name="AXIS_X" value="0"> + <constant name="AXIS_X" value="0" enum="Axis"> Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> - <constant name="AXIS_Y" value="1"> + <constant name="AXIS_Y" value="1" enum="Axis"> Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> - <constant name="AXIS_Z" value="2"> + <constant name="AXIS_Z" value="2" enum="Axis"> Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> - <constant name="AXIS_W" value="3"> + <constant name="AXIS_W" value="3" enum="Axis"> Enumerated value for the W axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> <constant name="ZERO" value="Vector4i(0, 0, 0, 0)"> diff --git a/doc/classes/VisualShaderNodeColorFunc.xml b/doc/classes/VisualShaderNodeColorFunc.xml index edb5238325..aa2dcca1d5 100644 --- a/doc/classes/VisualShaderNodeColorFunc.xml +++ b/doc/classes/VisualShaderNodeColorFunc.xml @@ -40,7 +40,32 @@ return vec3(r, g, b); [/codeblock] </constant> - <constant name="FUNC_MAX" value="4" enum="Function"> + <constant name="FUNC_LINEAR_TO_SRGB" value="4" enum="Function"> + Converts color from linear color space to sRGB color space using the following formula: + [codeblock] + vec3 c = clamp(c, vec3(0.0), vec3(1.0)); + const vec3 a = vec3(0.055f); + return mix((vec3(1.0f) + a) * pow(c.rgb, vec3(1.0f / 2.4f)) - a, 12.92f * c.rgb, lessThan(c.rgb, vec3(0.0031308f))); + [/codeblock] + The Compatibility renderer uses a simpler formula: + [codeblock] + vec3 c = input; + return max(vec3(1.055) * pow(c, vec3(0.416666667)) - vec3(0.055), vec3(0.0)); + [/codeblock] + </constant> + <constant name="FUNC_SRGB_TO_LINEAR" value="5" enum="Function"> + Converts color from sRGB color space to linear color space using the following formula: + [codeblock] + vec3 c = input; + return mix(pow((c.rgb + vec3(0.055)) * (1.0 / (1.0 + 0.055)), vec3(2.4)), c.rgb * (1.0 / 12.92), lessThan(c.rgb, vec3(0.04045))); + [/codeblock] + The Compatibility renderer uses a simpler formula: + [codeblock] + vec3 c = input; + return c * (c * (c * 0.305306011 + 0.682171111) + 0.012522878); + [/codeblock] + </constant> + <constant name="FUNC_MAX" value="6" enum="Function"> Represents the size of the [enum Function] enum. </constant> </constants> |
