diff options
Diffstat (limited to 'doc/classes')
27 files changed, 171 insertions, 43 deletions
diff --git a/doc/classes/ArrayOccluder3D.xml b/doc/classes/ArrayOccluder3D.xml index 993393cf50..cb682a7e62 100644 --- a/doc/classes/ArrayOccluder3D.xml +++ b/doc/classes/ArrayOccluder3D.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ArrayOccluder3D" inherits="Occluder3D" version="4.0"> <brief_description> + 3D polygon shape for use with occlusion culling in [OccluderInstance3D]. </brief_description> <description> + [ArrayOccluder3D] stores an arbitrary 3D polygon shape that can be used by the engine's occlusion culling system. This is analogous to [ArrayMesh], but for occluders. + See [OccluderInstance3D]'s documentation for instructions on setting up occlusion culling. </description> <tutorials> </tutorials> diff --git a/doc/classes/BoxOccluder3D.xml b/doc/classes/BoxOccluder3D.xml index 8c3b597193..d16cf55098 100644 --- a/doc/classes/BoxOccluder3D.xml +++ b/doc/classes/BoxOccluder3D.xml @@ -1,13 +1,17 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="BoxOccluder3D" inherits="Occluder3D" version="4.0"> <brief_description> + Cuboid shape for use with occlusion culling in [OccluderInstance3D]. </brief_description> <description> + [BoxOccluder3D] stores a cuboid shape that can be used by the engine's occlusion culling system. + See [OccluderInstance3D]'s documentation for instructions on setting up occlusion culling. </description> <tutorials> </tutorials> <members> <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(1, 1, 1)"> + The box's size in 3D units. </member> </members> </class> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 4e73d4d9d8..8fd01509ec 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -221,14 +221,15 @@ Returns a new color from [code]rgba[/code], an HTML hexadecimal color string. [code]rgba[/code] is not case sensitive, and may be prefixed with a '#' character. [code]rgba[/code] must be a valid three-digit or six-digit hexadecimal color string, and may contain an alpha channel value. If [code]rgba[/code] does not contain an alpha channel value, an alpha channel value of 1.0 is applied. If [code]rgba[/code] is invalid a Color(0.0, 0.0, 0.0, 1.0) is returned. + [b]Note:[/b] This method is not implemented in C#, but the same functionality is provided in the class constructor. [codeblocks] [gdscript] var green = Color.html("#00FF00FF") # set green to Color(0.0, 1.0, 0.0, 1.0) var blue = Color.html("#0000FF") # set blue to Color(0.0, 0.0, 1.0, 1.0) [/gdscript] [csharp] - var green = Color.Html("#00FF00FF"); // set green to Color(0.0, 1.0, 0.0, 1.0) - var blue = Color.Html("#0000FF"); // set blue to Color(0.0, 0.0, 1.0, 1.0) + var green = new Color("#00FF00FF"); // set green to Color(0.0, 1.0, 0.0, 1.0) + var blue = new Color("#0000FF"); // set blue to Color(0.0, 0.0, 1.0, 1.0) [/csharp] [/codeblocks] </description> diff --git a/doc/classes/Container.xml b/doc/classes/Container.xml index 83655425fc..076a800e29 100644 --- a/doc/classes/Container.xml +++ b/doc/classes/Container.xml @@ -10,6 +10,20 @@ <tutorials> </tutorials> <methods> + <method name="_get_allowed_size_flags_horizontal" qualifiers="virtual const"> + <return type="PackedInt32Array" /> + <description> + Implement to return a list of allowed horizontal [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the inspector dock. + [b]Note:[/b] Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed. + </description> + </method> + <method name="_get_allowed_size_flags_vertical" qualifiers="virtual const"> + <return type="PackedInt32Array" /> + <description> + Implement to return a list of allowed vertical [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the inspector dock. + [b]Note:[/b] Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed. + </description> + </method> <method name="fit_child_in_rect"> <return type="void" /> <argument index="0" name="child" type="Control" /> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index b6c2dac33c..f2d727bb51 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -1278,20 +1278,24 @@ <constant name="PRESET_MODE_KEEP_SIZE" value="3" enum="LayoutPresetMode"> The control's size will not change. </constant> + <constant name="SIZE_SHRINK_BEGIN" value="0" enum="SizeFlags"> + Tells the parent [Container] to align the node with its start, either the top or the left edge. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical]. + [b]Note:[/b] Setting this flag is equal to not having any size flags. + </constant> <constant name="SIZE_FILL" value="1" enum="SizeFlags"> - Tells the parent [Container] to expand the bounds of this node to fill all the available space without pushing any other node. Use with [member size_flags_horizontal] and [member size_flags_vertical]. + Tells the parent [Container] to expand the bounds of this node to fill all the available space without pushing any other node. It is mutually exclusive with shrink size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical]. </constant> <constant name="SIZE_EXPAND" value="2" enum="SizeFlags"> Tells the parent [Container] to let this node take all the available space on the axis you flag. If multiple neighboring nodes are set to expand, they'll share the space based on their stretch ratio. See [member size_flags_stretch_ratio]. Use with [member size_flags_horizontal] and [member size_flags_vertical]. </constant> <constant name="SIZE_EXPAND_FILL" value="3" enum="SizeFlags"> - Sets the node's size flags to both fill and expand. See the 2 constants above for more information. + Sets the node's size flags to both fill and expand. See [constant SIZE_FILL] and [constant SIZE_EXPAND] for more information. </constant> <constant name="SIZE_SHRINK_CENTER" value="4" enum="SizeFlags"> - Tells the parent [Container] to center the node in itself. It centers the control based on its bounding box, so it doesn't work with the fill or expand size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical]. + Tells the parent [Container] to center the node in the available space. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical]. </constant> <constant name="SIZE_SHRINK_END" value="8" enum="SizeFlags"> - Tells the parent [Container] to align the node with its end, either the bottom or the right edge. It doesn't work with the fill or expand size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical]. + Tells the parent [Container] to align the node with its end, either the bottom or the right edge. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical]. </constant> <constant name="MOUSE_FILTER_STOP" value="0" enum="MouseFilter"> The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls. diff --git a/doc/classes/EngineDebugger.xml b/doc/classes/EngineDebugger.xml index 861053b1c9..3c2f735e72 100644 --- a/doc/classes/EngineDebugger.xml +++ b/doc/classes/EngineDebugger.xml @@ -65,14 +65,9 @@ <method name="register_profiler"> <return type="void" /> <argument index="0" name="name" type="StringName" /> - <argument index="1" name="toggle" type="Callable" /> - <argument index="2" name="add" type="Callable" /> - <argument index="3" name="tick" type="Callable" /> + <argument index="1" name="profiler" type="EngineProfiler" /> <description> - Registers a profiler with the given [code]name[/code]. - [code]toggle[/code] callable is called when the profiler is enabled/disabled. It must take an argument array as an argument. - [code]add[/code] callable is called when data is added to profiler using [method EngineDebugger.profiler_add_frame_data]. It must take a data array as argument. - [code]tick[/code] callable is called at every active profiler iteration. It must take frame time, idle time, physics time, and physics idle time as arguments. + Registers a profiler with the given [code]name[/code]. See [EngineProfiler] for more information. </description> </method> <method name="send_message"> diff --git a/doc/classes/EngineProfiler.xml b/doc/classes/EngineProfiler.xml new file mode 100644 index 0000000000..60817338b8 --- /dev/null +++ b/doc/classes/EngineProfiler.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EngineProfiler" inherits="RefCounted" version="4.0"> + <brief_description> + Base class for creating custom profilers. + </brief_description> + <description> + This class can be used to implement custom profilers that are able to interact with the engine and editor debugger. + See [EngineDebugger] and [EditorDebuggerPlugin] for more information. + </description> + <tutorials> + </tutorials> + <methods> + <method name="_add_frame" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="data" type="Array" /> + <description> + Called when data is added to profiler using [method EngineDebugger.profiler_add_frame_data]. + </description> + </method> + <method name="_tick" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="frame_time" type="float" /> + <argument index="1" name="idle_time" type="float" /> + <argument index="2" name="physics_time" type="float" /> + <argument index="3" name="physics_frame_time" type="float" /> + <description> + Called once every engine iteration when the profiler is active with information about the current frame. + </description> + </method> + <method name="_toggle" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> + <argument index="1" name="options" type="Array" /> + <description> + Called when the profiler is enabled/disabled, along with a set of [code]options[/code]. + </description> + </method> + </methods> +</class> diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index c8c0494378..f2dbcec228 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -171,11 +171,11 @@ </member> <member name="reflected_light_source" type="int" setter="set_reflection_source" getter="get_reflection_source" enum="Environment.ReflectionSource" default="0"> </member> - <member name="sdfgi_bounce_feedback" type="float" setter="set_sdfgi_bounce_feedback" getter="get_sdfgi_bounce_feedback" default="0.0"> + <member name="sdfgi_bounce_feedback" type="float" setter="set_sdfgi_bounce_feedback" getter="get_sdfgi_bounce_feedback" default="0.5"> </member> <member name="sdfgi_cascade0_distance" type="float" setter="set_sdfgi_cascade0_distance" getter="get_sdfgi_cascade0_distance" default="12.8"> </member> - <member name="sdfgi_cascades" type="int" setter="set_sdfgi_cascades" getter="get_sdfgi_cascades" default="6"> + <member name="sdfgi_cascades" type="int" setter="set_sdfgi_cascades" getter="get_sdfgi_cascades" default="4"> The number of cascades to use for SDFGI (between 1 and 8). A higher number of cascades allows displaying SDFGI further away while preserving detail up close, at the cost of performance. When using SDFGI on small-scale levels, [member sdfgi_cascades] can often be decreased between [code]1[/code] and [code]4[/code] to improve performance. </member> <member name="sdfgi_enabled" type="bool" setter="set_sdfgi_enabled" getter="is_sdfgi_enabled" default="false"> @@ -185,7 +185,7 @@ </member> <member name="sdfgi_energy" type="float" setter="set_sdfgi_energy" getter="get_sdfgi_energy" default="1.0"> </member> - <member name="sdfgi_max_distance" type="float" setter="set_sdfgi_max_distance" getter="get_sdfgi_max_distance" default="819.2"> + <member name="sdfgi_max_distance" type="float" setter="set_sdfgi_max_distance" getter="get_sdfgi_max_distance" default="204.8"> </member> <member name="sdfgi_min_cell_size" type="float" setter="set_sdfgi_min_cell_size" getter="get_sdfgi_min_cell_size" default="0.2"> </member> @@ -193,11 +193,11 @@ </member> <member name="sdfgi_probe_bias" type="float" setter="set_sdfgi_probe_bias" getter="get_sdfgi_probe_bias" default="1.1"> </member> - <member name="sdfgi_read_sky_light" type="bool" setter="set_sdfgi_read_sky_light" getter="is_sdfgi_reading_sky_light" default="false"> + <member name="sdfgi_read_sky_light" type="bool" setter="set_sdfgi_read_sky_light" getter="is_sdfgi_reading_sky_light" default="true"> </member> <member name="sdfgi_use_occlusion" type="bool" setter="set_sdfgi_use_occlusion" getter="is_sdfgi_using_occlusion" default="false"> </member> - <member name="sdfgi_y_scale" type="int" setter="set_sdfgi_y_scale" getter="get_sdfgi_y_scale" enum="Environment.SDFGIYScale" default="0"> + <member name="sdfgi_y_scale" type="int" setter="set_sdfgi_y_scale" getter="get_sdfgi_y_scale" enum="Environment.SDFGIYScale" default="1"> </member> <member name="sky" type="Sky" setter="set_sky" getter="get_sky"> The [Sky] resource used for this [Environment]. @@ -379,11 +379,11 @@ <constant name="GLOW_BLEND_MODE_MIX" value="4" enum="GlowBlendMode"> Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect. </constant> - <constant name="SDFGI_Y_SCALE_DISABLED" value="0" enum="SDFGIYScale"> + <constant name="SDFGI_Y_SCALE_50_PERCENT" value="0" enum="SDFGIYScale"> </constant> <constant name="SDFGI_Y_SCALE_75_PERCENT" value="1" enum="SDFGIYScale"> </constant> - <constant name="SDFGI_Y_SCALE_50_PERCENT" value="2" enum="SDFGIYScale"> + <constant name="SDFGI_Y_SCALE_100_PERCENT" value="2" enum="SDFGIYScale"> </constant> </constants> </class> diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml index 55b715c3fc..658f7dd34d 100644 --- a/doc/classes/FontData.xml +++ b/doc/classes/FontData.xml @@ -577,7 +577,7 @@ Font style flags, see [enum TextServer.FontStyle]. </member> <member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="is_force_autohinter" default="false"> - If set to [code]true[/code], auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only. + If set to [code]true[/code], auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only. </member> <member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="TextServer.Hinting" default="1"> Font hinting mode. Used by dynamic fonts only. diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml index f97198658e..1fde3c8463 100644 --- a/doc/classes/GPUParticles2D.xml +++ b/doc/classes/GPUParticles2D.xml @@ -119,7 +119,7 @@ Particle starts with specified color. </constant> <constant name="EMIT_FLAG_CUSTOM" value="16" enum="EmitFlags"> - Particle starts with specificed [code]CUSTOM[/code] data. + Particle starts with specified [code]CUSTOM[/code] data. </constant> </constants> </class> diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml index 62ac846077..fc490eac96 100644 --- a/doc/classes/GPUParticles3D.xml +++ b/doc/classes/GPUParticles3D.xml @@ -150,7 +150,7 @@ Particle starts with specified color. </constant> <constant name="EMIT_FLAG_CUSTOM" value="16" enum="EmitFlags"> - Particle starts with specificed [code]CUSTOM[/code] data. + Particle starts with specified [code]CUSTOM[/code] data. </constant> <constant name="MAX_DRAW_PASSES" value="4"> Maximum number of draw passes supported. diff --git a/doc/classes/Occluder3D.xml b/doc/classes/Occluder3D.xml index 6c6c410bc3..01f009abdb 100644 --- a/doc/classes/Occluder3D.xml +++ b/doc/classes/Occluder3D.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Occluder3D" inherits="Resource" version="4.0"> <brief_description> + Occluder shape resource for use with occlusion culling in [OccluderInstance3D]. </brief_description> <description> + [Occluder3D] stores an occluder shape that can be used by the engine's occlusion culling system. + See [OccluderInstance3D]'s documentation for instructions on setting up occlusion culling. </description> <tutorials> </tutorials> @@ -10,11 +13,13 @@ <method name="get_indices" qualifiers="const"> <return type="PackedInt32Array" /> <description> + Returns the occluder shape's vertex indices. </description> </method> <method name="get_vertices" qualifiers="const"> <return type="PackedVector3Array" /> <description> + Returns the occluder shape's vertex positions. </description> </method> </methods> diff --git a/doc/classes/OccluderInstance3D.xml b/doc/classes/OccluderInstance3D.xml index 32e48f9a70..0b5fc0fd26 100644 --- a/doc/classes/OccluderInstance3D.xml +++ b/doc/classes/OccluderInstance3D.xml @@ -1,8 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="OccluderInstance3D" inherits="Node3D" version="4.0"> <brief_description> + Provides occlusion culling for 3D nodes, which improves performance in closed areas. </brief_description> <description> + Occlusion culling can improve rendering performance in closed/semi-open areas by hiding geometry that is occluded by other objects. + The occlusion culling system is mostly static. [OccluderInstance3D]s can be moved or hidden at run-time, but doing so will trigger a background recomputation that can take several frames. It is recommended to only move [OccluderInstance3D]s sporadically (e.g. for procedural generation purposes), rather than doing so every frame. + The occlusion culling system works by rendering the occluders on the CPU in parallel using [url=https://www.embree.org/]Embree[/url], drawing the result to a low-resolution buffer then using this to cull 3D nodes individually. In the 3D editor, you can preview the occlusion culling buffer by choosing [b]Perspective > Debug Advanced... > Occlusion Culling Buffer[/b] in the top-left corner of the 3D viewport. The occlusion culling buffer quality can be adjusted in the Project Settings. + [b]Baking:[/b] Select an [OccluderInstance3D] node, then use the [b]Bake Occluders[/b] button at the top of the 3D editor. Only opaque materials will be taken into account; transparent materials (alpha-blended or alpha-tested) will be ignored by the occluder generation. + [b]Note:[/b] Occlusion culling is only effective if [member ProjectSettings.rendering/occlusion_culling/use_occlusion_culling] is [code]true[/code]. Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it. Large open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges ([member GeometryInstance3D.visibility_range_begin] and [member GeometryInstance3D.visibility_range_end]) compared to occlusion culling. </description> <tutorials> </tutorials> @@ -11,7 +17,7 @@ <return type="bool" /> <argument index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [code]layer_number[/code] between 1 and 20. + Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="set_bake_mask_value"> @@ -19,16 +25,25 @@ <argument index="0" name="layer_number" type="int" /> <argument index="1" name="value" type="bool" /> <description> - Based on [code]value[/code], enables or disables the specified layer in the [member bake_mask], given a [code]layer_number[/code] between 1 and 20. + Based on [code]value[/code], enables or disables the specified layer in the [member bake_mask], given a [code]layer_number[/code] between 1 and 32. </description> </method> </methods> <members> <member name="bake_mask" type="int" setter="set_bake_mask" getter="get_bake_mask" default="4294967295"> + The visual layers to account for when baking for occluders. Only [MeshInstance3D]s whose [member VisualInstance3D.layers] match with this [member bake_mask] will be included in the generated occluder mesh. By default, all objects are taken into account for the occluder baking. + To improve performance and avoid artifacts, it is recommended to exclude dynamic objects, small objects and fixtures from the baking process by moving them to a separate visual layer and excluding this layer in [member bake_mask]. </member> <member name="bake_simplification_distance" type="float" setter="set_bake_simplification_distance" getter="get_bake_simplification_distance" default="0.1"> + The simplification distance to use for simplifying the generated occluder polygon (in 3D units). Higher values result in a less detailed occluder mesh, which improves performance but reduces culling accuracy. + The occluder geometry is rendered on the CPU, so it is important to keep its geometry as simple as possible. Since the buffer is rendered at a low resolution, less detailed occluder meshes generally still work well. The default value is fairly aggressive, so you may have to decrase it if you run into false negatives (objects being occluded even though they are visible by the camera). A value of [code]0.01[/code] will act conservatively, and will keep geometry [i]perceptually[/i] unaffected in the occlusion culling buffer. Depending on the scene, a value of [code]0.01[/code] may still simplify the mesh noticeably compared to disabling simplification entirely. + Setting this to [code]0.0[/code] disables simplification entirely, but vertices in the exact same position will still be merged. The mesh will also be re-indexed to reduce both the number of vertices and indices. + [b]Note:[/b] This uses the [url=https://meshoptimizer.org/]meshoptimizer[/url] library under the hood, similar to LOD generation. </member> <member name="occluder" type="Occluder3D" setter="set_occluder" getter="get_occluder"> + The occluder resource for this [OccluderInstance3D]. You can generate an occluder resource by selecting an [OccluderInstance3D] node then using the [b]Bake Occluders[/b] button at the top of the editor. + You can also draw your own 2D occluder polygon by adding a new [PolygonOccluder3D] resource to the [member occluder] property in the inspector. + Alternatively, you can select a primitive occluder to use: [QuadOccluder3D], [BoxOccluder3D] or [SphereOccluder3D]. </member> </members> </class> diff --git a/doc/classes/PolygonOccluder3D.xml b/doc/classes/PolygonOccluder3D.xml index a4d910c983..e4bd84beac 100644 --- a/doc/classes/PolygonOccluder3D.xml +++ b/doc/classes/PolygonOccluder3D.xml @@ -1,13 +1,18 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PolygonOccluder3D" inherits="Occluder3D" version="4.0"> <brief_description> + Flat 2D polygon shape for use with occlusion culling in [OccluderInstance3D]. </brief_description> <description> + [PolygonOccluder3D] stores a polygon shape that can be used by the engine's occlusion culling system. When an [OccluderInstance3D] with a [PolygonOccluder3D] is selected in the editor, an editor will appear at the top of the 3D viewport so you can add/remove points. All points must be placed on the same 2D plane, which means it is not possible to create arbitrary 3D shapes with a single [PolygonOccluder3D]. To use arbitrary 3D shapes as occluders, use [ArrayOccluder3D] or [OccluderInstance3D]'s baking feature instead. + See [OccluderInstance3D]'s documentation for instructions on setting up occlusion culling. </description> <tutorials> </tutorials> <members> <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array()"> + The polygon to use for occlusion culling. The polygon can be convex or concave, but it should have as few points as possible to maximize performance. + The polygon must [i]not[/i] have intersecting lines. Otherwise, triangulation will fail (with an error message printed). </member> </members> </class> diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml index dc5dd47287..36bdd6e6e4 100644 --- a/doc/classes/Popup.xml +++ b/doc/classes/Popup.xml @@ -1,17 +1,17 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Popup" inherits="Window" version="4.0"> <brief_description> - Base container control for popups and dialogs. + Popup is a base window container for popup-like subwindows. </brief_description> <description> - Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior. + Popup is a base window container for popup-like subwindows. It's a modal by default (see [member close_on_parent_focus]) and has helpers for custom popup behavior. </description> <tutorials> </tutorials> <members> <member name="borderless" type="bool" setter="set_flag" getter="get_flag" overrides="Window" default="true" /> <member name="close_on_parent_focus" type="bool" setter="set_close_on_parent_focus" getter="get_close_on_parent_focus" default="true"> - If [code]true[/code], the [Popup] will close when its parent is focused. + If true, the [Popup] will close when its parent [Window] is focused. </member> <member name="transient" type="bool" setter="set_transient" getter="is_transient" overrides="Window" default="true" /> <member name="unresizable" type="bool" setter="set_flag" getter="get_flag" overrides="Window" default="true" /> @@ -21,7 +21,7 @@ <signals> <signal name="popup_hide"> <description> - Emitted when a popup is hidden. + Emitted when the popup is hidden. </description> </signal> </signals> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index b316f822f0..29a4cfcd46 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -4,7 +4,7 @@ PopupMenu displays a list of options. </brief_description> <description> - [PopupMenu] is a [Control] that displays a list of options. They are popular in toolbars or context menus. + [PopupMenu] is a modal window used to display a list of options. They are popular in toolbars or context menus. The size of a [PopupMenu] can be limited by using [member Window.max_size]. If the height of the list of items is larger than the maximum height of the [PopupMenu], a [ScrollContainer] within the popup will allow the user to scroll the contents. If no maximum size is set, or if it is set to 0, the [PopupMenu] height will be limited by its parent rect. </description> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index ed124d1d15..4b5f7b2091 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1696,13 +1696,13 @@ If [code]true[/code], renders [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) buffers at halved resolution (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. [LightmapGI] rendering is not affected by this setting. [b]Note:[/b] This property is only read when the project starts. To set half-resolution GI at run-time, call [method RenderingServer.gi_set_use_half_resolution] instead. </member> - <member name="rendering/global_illumination/sdfgi/frames_to_converge" type="int" setter="" getter="" default="4"> + <member name="rendering/global_illumination/sdfgi/frames_to_converge" type="int" setter="" getter="" default="5"> </member> <member name="rendering/global_illumination/sdfgi/frames_to_update_lights" type="int" setter="" getter="" default="2"> </member> <member name="rendering/global_illumination/sdfgi/probe_ray_count" type="int" setter="" getter="" default="1"> </member> - <member name="rendering/global_illumination/voxel_gi/quality" type="int" setter="" getter="" default="1"> + <member name="rendering/global_illumination/voxel_gi/quality" type="int" setter="" getter="" default="0"> </member> <member name="rendering/lightmapping/bake_performance/max_rays_per_pass" type="int" setter="" getter="" default="32"> </member> @@ -1746,10 +1746,14 @@ [b]Note:[/b] This property is only read when the project starts. To adjust the automatic LOD threshold at runtime, set [member Viewport.mesh_lod_threshold] on the root [Viewport]. </member> <member name="rendering/occlusion_culling/bvh_build_quality" type="int" setter="" getter="" default="2"> + The [url=https://en.wikipedia.org/wiki/Bounding_volume_hierarchy]BVH[/url] quality to use when rendering the occlusion culling buffer. Higher values will result in more accurate occlusion culling, at the cost of higher CPU usage. </member> <member name="rendering/occlusion_culling/occlusion_rays_per_thread" type="int" setter="" getter="" default="512"> + Higher values will result in more accurate occlusion culling, at the cost of higher CPU usage. The occlusion culling buffer's pixel count is roughly equal to [code]occlusion_rays_per_thread * number_of_logical_cpu_cores[/code], so it will depend on the system's CPU. Therefore, CPUs with fewer cores will use a lower resolution to attempt keeping performance costs even across devices. </member> <member name="rendering/occlusion_culling/use_occlusion_culling" type="bool" setter="" getter="" default="false"> + If [code]true[/code], [OccluderInstance3D] nodes will be usable for occlusion culling in 3D in the root viewport. In custom viewports, [member Viewport.use_occlusion_culling] must be set to [code]true[/code] instead. + [b]Note:[/b] Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it. Large open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges ([member GeometryInstance3D.visibility_range_begin] and [member GeometryInstance3D.visibility_range_end]) compared to occlusion culling. </member> <member name="rendering/reflections/reflection_atlas/reflection_count" type="int" setter="" getter="" default="64"> Number of cubemaps to store in the reflection atlas. The number of [ReflectionProbe]s in a scene will be limited by this amount. A higher number requires more VRAM. @@ -1826,7 +1830,7 @@ <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_quality" type="int" setter="" getter="" default="3"> + <member name="rendering/shadows/directional_shadow/soft_shadow_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. @@ -1854,7 +1858,7 @@ <member name="rendering/shadows/shadow_atlas/size.mobile" type="int" setter="" getter="" default="2048"> Lower-end override for [member rendering/shadows/shadow_atlas/size] on mobile devices, due to performance concerns or driver support. </member> - <member name="rendering/shadows/shadows/soft_shadow_quality" type="int" setter="" getter="" default="3"> + <member name="rendering/shadows/shadows/soft_shadow_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. diff --git a/doc/classes/QuadOccluder3D.xml b/doc/classes/QuadOccluder3D.xml index c1b89149f5..44cbfb88ff 100644 --- a/doc/classes/QuadOccluder3D.xml +++ b/doc/classes/QuadOccluder3D.xml @@ -1,13 +1,17 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="QuadOccluder3D" inherits="Occluder3D" version="4.0"> <brief_description> + Flat plane shape for use with occlusion culling in [OccluderInstance3D]. </brief_description> <description> + [QuadOccluder3D] stores a flat plane shape that can be used by the engine's occlusion culling system. See also [PolygonOccluder3D] if you need to customize the quad's shape. + See [OccluderInstance3D]'s documentation for instructions on setting up occlusion culling. </description> <tutorials> </tutorials> <members> <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(1, 1)"> + The quad's size in 3D units. </member> </members> </class> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 82728c0570..82436b10a5 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -4181,11 +4181,11 @@ <constant name="ENV_SSIL_QUALITY_ULTRA" value="4" enum="EnvironmentSSILQuality"> Highest quality screen-space indirect lighting. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality. </constant> - <constant name="ENV_SDFGI_Y_SCALE_DISABLED" value="0" enum="EnvironmentSDFGIYScale"> + <constant name="ENV_SDFGI_Y_SCALE_50_PERCENT" value="0" enum="EnvironmentSDFGIYScale"> </constant> <constant name="ENV_SDFGI_Y_SCALE_75_PERCENT" value="1" enum="EnvironmentSDFGIYScale"> </constant> - <constant name="ENV_SDFGI_Y_SCALE_50_PERCENT" value="2" enum="EnvironmentSDFGIYScale"> + <constant name="ENV_SDFGI_Y_SCALE_100_PERCENT" value="2" enum="EnvironmentSDFGIYScale"> </constant> <constant name="ENV_SDFGI_RAY_COUNT_4" value="0" enum="EnvironmentSDFGIRayCount"> </constant> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 95dffd3e28..6a2812bb93 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -55,6 +55,12 @@ Returns the height of the content. </description> </method> + <method name="get_content_width" qualifiers="const"> + <return type="int" /> + <description> + Returns the width of the content. + </description> + </method> <method name="get_line_count" qualifiers="const"> <return type="int" /> <description> diff --git a/doc/classes/SphereOccluder3D.xml b/doc/classes/SphereOccluder3D.xml index 1ffa51e170..da847cc43f 100644 --- a/doc/classes/SphereOccluder3D.xml +++ b/doc/classes/SphereOccluder3D.xml @@ -1,13 +1,17 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="SphereOccluder3D" inherits="Occluder3D" version="4.0"> <brief_description> + Spherical shape for use with occlusion culling in [OccluderInstance3D]. </brief_description> <description> + [SphereOccluder3D] stores a sphere shape that can be used by the engine's occlusion culling system. + See [OccluderInstance3D]'s documentation for instructions on setting up occlusion culling. </description> <tutorials> </tutorials> <members> <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> + The sphere's radius in 3D units. </member> </members> </class> diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml index b500bd5658..b212cec5f2 100644 --- a/doc/classes/TextServerExtension.xml +++ b/doc/classes/TextServerExtension.xml @@ -557,7 +557,7 @@ <argument index="0" name="font_rid" type="RID" /> <argument index="1" name="force_autohinter" type="bool" /> <description> - If set to [code]true[/code] auto-hinting is preffered over font built-in hinting. + If set to [code]true[/code] auto-hinting is preferred over font built-in hinting. </description> </method> <method name="_font_set_global_oversampling" qualifiers="virtual"> diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml index 6ece42da6b..546b7ec242 100644 --- a/doc/classes/TranslationServer.xml +++ b/doc/classes/TranslationServer.xml @@ -138,7 +138,7 @@ <return type="String" /> <argument index="0" name="locale" type="String" /> <description> - Retunrs [code]locale[/code] string standardized to match known locales (e.g. [code]en-US[/code] would be matched to [code]en_US[/code]). + Returns [code]locale[/code] string standardized to match known locales (e.g. [code]en-US[/code] would be matched to [code]en_US[/code]). </description> </method> <method name="translate" qualifiers="const"> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 4b051c4938..35a70ae53f 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -72,6 +72,13 @@ [b]Note:[/b] Despite the name of this method, the focus cursor itself is only visible in [constant SELECT_MULTI] mode. </description> </method> + <method name="get_button_id_at_position" qualifiers="const"> + <return type="int" /> + <argument index="0" name="position" type="Vector2" /> + <description> + Returns the button id at [code]position[/code], or -1 if no button is there. + </description> + </method> <method name="get_column_at_position" qualifiers="const"> <return type="int" /> <argument index="0" name="position" type="Vector2" /> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index 12c91cdd10..675c534e7b 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -14,11 +14,11 @@ <return type="void" /> <argument index="0" name="column" type="int" /> <argument index="1" name="button" type="Texture2D" /> - <argument index="2" name="button_idx" type="int" default="-1" /> + <argument index="2" name="id" type="int" default="-1" /> <argument index="3" name="disabled" type="bool" default="false" /> <argument index="4" name="tooltip" type="String" default="""" /> <description> - Adds a button with [Texture2D] [code]button[/code] at column [code]column[/code]. The [code]button_idx[/code] index is used to identify the button when calling other methods. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately after this method. Optionally, the button can be [code]disabled[/code] and have a [code]tooltip[/code]. + Adds a button with [Texture2D] [code]button[/code] at column [code]column[/code]. The [code]id[/code] is used to identify the button. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately after this method. Optionally, the button can be [code]disabled[/code] and have a [code]tooltip[/code]. </description> </method> <method name="call_recursive" qualifiers="vararg"> @@ -80,6 +80,14 @@ Returns the [Texture2D] of the button at index [code]button_idx[/code] in column [code]column[/code]. </description> </method> + <method name="get_button_by_id" qualifiers="const"> + <return type="int" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="id" type="int" /> + <description> + Returns the button index if there is a button with id [code]id[/code] in column [code]column[/code], otherwise returns -1. + </description> + </method> <method name="get_button_count" qualifiers="const"> <return type="int" /> <argument index="0" name="column" type="int" /> @@ -87,6 +95,14 @@ Returns the number of buttons in column [code]column[/code]. May be used to get the most recently added button's index, if no index was specified. </description> </method> + <method name="get_button_id" qualifiers="const"> + <return type="int" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="button_idx" type="int" /> + <description> + Returns the id for the button at index [code]button_idx[/code] in column [code]column[/code]. + </description> + </method> <method name="get_button_tooltip" qualifiers="const"> <return type="String" /> <argument index="0" name="column" type="int" /> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 7a60ca9fa6..93c1e8417b 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -55,7 +55,7 @@ <method name="get_mouse_position" qualifiers="const"> <return type="Vector2" /> <description> - Returns the mouse's positon in this [Viewport] using the coordinate system of this [Viewport]. + Returns the mouse's position in this [Viewport] using the coordinate system of this [Viewport]. </description> </method> <method name="get_render_info"> @@ -128,7 +128,7 @@ <method name="gui_release_focus"> <return type="void" /> <description> - Removes the focus from the currently focussed [Control] within this viewport. If no [Control] has the focus, does nothing. + Removes the focus from the currently focused [Control] within this viewport. If no [Control] has the focus, does nothing. </description> </method> <method name="is_embedding_subwindows" qualifiers="const"> @@ -285,6 +285,8 @@ <member name="use_debanding" type="bool" setter="set_use_debanding" getter="is_using_debanding" default="false"> </member> <member name="use_occlusion_culling" type="bool" setter="set_use_occlusion_culling" getter="is_using_occlusion_culling" default="false"> + If [code]true[/code], [OccluderInstance3D] nodes will be usable for occlusion culling in 3D for this viewport. For the root viewport, [member ProjectSettings.rendering/occlusion_culling/use_occlusion_culling] must be set to [code]true[/code] instead. + [b]Note:[/b] Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it, and think whether your scene can actually benefit from occlusion culling. Large, open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges ([member GeometryInstance3D.visibility_range_begin] and [member GeometryInstance3D.visibility_range_end]) compared to occlusion culling. </member> <member name="use_xr" type="bool" setter="set_use_xr" getter="is_using_xr" default="false"> If [code]true[/code], the viewport will use the primary XR interface to render XR output. When applicable this can result in a stereoscopic image and the resulting render being output to a headset. diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index ab8f51ced5..82bb74683f 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -435,7 +435,7 @@ <constant name="CONTENT_SCALE_ASPECT_EXPAND" value="4" enum="ContentScaleAspect"> </constant> <constant name="LAYOUT_DIRECTION_INHERITED" value="0" enum="LayoutDirection"> - Automatic layout direction, determined from the parent control layout direction. + Automatic layout direction, determined from the parent window layout direction. </constant> <constant name="LAYOUT_DIRECTION_LOCALE" value="1" enum="LayoutDirection"> Automatic layout direction, determined from the current locale. |