diff --git a/classes/class_audioserver.rst b/classes/class_audioserver.rst index 2aa1c5e2564..b379ba4e6a7 100644 --- a/classes/class_audioserver.rst +++ b/classes/class_audioserver.rst @@ -289,7 +289,7 @@ Name of the current device for audio output (see :ref:`get_output_device_list` value **)** - :ref:`float` **get_playback_speed_scale** **(** **)** -Scales the rate at which audio is played (i.e. setting it to ``0.5`` will make the audio be played at half its speed). +Scales the rate at which audio is played (i.e. setting it to ``0.5`` will make the audio be played at half its speed). See also :ref:`Engine.time_scale` to affect the general simulation speed, which is independent from :ref:`playback_speed_scale`. .. rst-class:: classref-section-separator diff --git a/classes/class_basematerial3d.rst b/classes/class_basematerial3d.rst index 4b5dfbecfa8..2b32099288a 100644 --- a/classes/class_basematerial3d.rst +++ b/classes/class_basematerial3d.rst @@ -479,7 +479,7 @@ enum **TextureFilter**: :ref:`TextureFilter` **TEXTURE_FILTER_NEAREST** = ``0`` -The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. +The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_LINEAR: @@ -487,7 +487,7 @@ The texture filter reads from the nearest pixel only. The simplest and fastest m :ref:`TextureFilter` **TEXTURE_FILTER_LINEAR** = ``1`` -The texture filter blends between the nearest 4 pixels. Use this when you want to avoid a pixelated style, but do not want mipmaps. +The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: @@ -495,7 +495,7 @@ The texture filter blends between the nearest 4 pixels. Use this when you want t :ref:`TextureFilter` **TEXTURE_FILTER_NEAREST_WITH_MIPMAPS** = ``2`` -The texture filter reads from the nearest pixel in the nearest mipmap. The fastest way to read from textures with mipmaps. +The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look pixelated from up close, and smooth from a distance. .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: @@ -503,7 +503,7 @@ The texture filter reads from the nearest pixel in the nearest mipmap. The faste :ref:`TextureFilter` **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS** = ``3`` -The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for most cases as mipmaps are important to smooth out pixels that are far from the camera. +The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look smooth from up close, and smooth from a distance. .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: @@ -511,7 +511,7 @@ The texture filter blends between the nearest 4 pixels and between the nearest 2 :ref:`TextureFilter` **TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC** = ``4`` -The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: @@ -519,7 +519,7 @@ The texture filter reads from the nearest pixel, but selects a mipmap based on t :ref:`TextureFilter` **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC** = ``5`` -The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_MAX: diff --git a/classes/class_cameraattributesphysical.rst b/classes/class_cameraattributesphysical.rst index 899ed72d154..a01e3278f4f 100644 --- a/classes/class_cameraattributesphysical.rst +++ b/classes/class_cameraattributesphysical.rst @@ -145,7 +145,7 @@ Only available when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physi - void **set_shutter_speed** **(** :ref:`float` value **)** - :ref:`float` **get_shutter_speed** **(** **)** -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. +Time for shutter to open and close, evaluated as ``1 / shutter_speed`` seconds. A higher value will allow less light (leading to a darker image), while a lower value will allow more light (leading to a brighter image). Only available when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units` is enabled. diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 4fdd54522d6..778941ff915 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -288,7 +288,7 @@ The **CanvasItem** will inherit the filter from its parent. :ref:`TextureFilter` **TEXTURE_FILTER_NEAREST** = ``1`` -The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering. Useful for pixel art. +The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_CanvasItem_constant_TEXTURE_FILTER_LINEAR: @@ -296,7 +296,7 @@ The texture filter reads from the nearest pixel only. The simplest and fastest m :ref:`TextureFilter` **TEXTURE_FILTER_LINEAR** = ``2`` -The texture filter blends between the nearest four pixels. Use this for most cases where you want to avoid a pixelated style. +The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_CanvasItem_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: @@ -304,7 +304,9 @@ The texture filter blends between the nearest four pixels. Use this for most cas :ref:`TextureFilter` **TEXTURE_FILTER_NEAREST_WITH_MIPMAPS** = ``3`` -The texture filter reads from the nearest pixel in the nearest mipmap. This is the fastest way to read from textures with mipmaps. +The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look pixelated from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_CanvasItem_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: @@ -312,7 +314,9 @@ The texture filter reads from the nearest pixel in the nearest mipmap. This is t :ref:`TextureFilter` **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS** = ``4`` -The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. +The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look smooth from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_CanvasItem_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: @@ -320,9 +324,9 @@ The texture filter blends between the nearest 4 pixels and between the nearest 2 :ref:`TextureFilter` **TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC** = ``5`` -The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. -\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`TEXTURE_FILTER_NEAREST_WITH_MIPMAPS` is usually more appropriate. +\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`TEXTURE_FILTER_NEAREST_WITH_MIPMAPS` is usually more appropriate in this case. .. _class_CanvasItem_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: @@ -330,9 +334,9 @@ The texture filter reads from the nearest pixel, but selects a mipmap based on t :ref:`TextureFilter` **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC** = ``6`` -The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. -\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`TEXTURE_FILTER_LINEAR_WITH_MIPMAPS` is usually more appropriate. +\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`TEXTURE_FILTER_LINEAR_WITH_MIPMAPS` is usually more appropriate in this case. .. _class_CanvasItem_constant_TEXTURE_FILTER_MAX: diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index 1c51943a532..8a85879b6fb 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -2485,9 +2485,9 @@ The icon and font color scheme to use in the editor. - **Auto** determines the color scheme to use automatically based on :ref:`interface/theme/base_color`. -- **Dark** makes fonts and icons light (suitable for dark themes). +- **Dark** makes fonts and icons dark (suitable for light themes). Icon colors are automatically converted by the editor following the set of rules defined in `this file `__. -- **Light** makes fonts and icons dark (suitable for light themes). Icon colors are automatically converted by the editor following `this set of rules `__. +- **Light** makes fonts and icons light (suitable for dark themes). .. rst-class:: classref-item-separator diff --git a/classes/class_engine.rst b/classes/class_engine.rst index 632de147e18..438bf0a22c6 100644 --- a/classes/class_engine.rst +++ b/classes/class_engine.rst @@ -228,6 +228,10 @@ If ``false``, stops printing error and warning messages to the console and edito Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed. This also affects :ref:`Timer` and :ref:`SceneTreeTimer` (see :ref:`SceneTree.create_timer` for how to control this). +\ **Note:** This does not affect audio playback speed. Use :ref:`AudioServer.playback_speed_scale` to adjust audio playback speed independently of :ref:`time_scale`. + +\ **Note:** This does not automatically adjust :ref:`physics_ticks_per_second`, which means that with time scales above 1.0, physics simulation may become less precise (as each physics tick will stretch over a larger period of engine time). If you're using :ref:`time_scale` to speed up simulation by a large factor, consider increasing :ref:`physics_ticks_per_second` as well to improve physics reliability. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_gpuparticles2d.rst b/classes/class_gpuparticles2d.rst index 541020cbb53..b1f43904827 100644 --- a/classes/class_gpuparticles2d.rst +++ b/classes/class_gpuparticles2d.rst @@ -692,6 +692,8 @@ void **emit_particle** **(** :ref:`Transform2D` xform, :ref:` Emits a single particle. Whether ``xform``, ``velocity``, ``color`` and ``custom`` are applied depends on the value of ``flags``. See :ref:`EmitFlags`. +The default ParticleProcessMaterial will overwrite ``color`` and use the contents of ``custom`` as ``(rotation, age, animation, lifetime)``. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_gpuparticles3d.rst b/classes/class_gpuparticles3d.rst index 1266893fc5e..1891fa6e040 100644 --- a/classes/class_gpuparticles3d.rst +++ b/classes/class_gpuparticles3d.rst @@ -843,6 +843,8 @@ void **emit_particle** **(** :ref:`Transform3D` xform, :ref:` Emits a single particle. Whether ``xform``, ``velocity``, ``color`` and ``custom`` are applied depends on the value of ``flags``. See :ref:`EmitFlags`. +The default ParticleProcessMaterial will overwrite ``color`` and use the contents of ``custom`` as ``(rotation, age, animation, lifetime)``. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_input.rst b/classes/class_input.rst index b36ec486987..62b77b82306 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -42,11 +42,15 @@ Properties .. table:: :widths: auto - +----------------------------------------+--------------------------------------------------------------------------+ - | :ref:`MouseMode` | :ref:`mouse_mode` | - +----------------------------------------+--------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`use_accumulated_input` | - +----------------------------------------+--------------------------------------------------------------------------+ + +----------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`emulate_mouse_from_touch` | + +----------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`emulate_touch_from_mouse` | + +----------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`MouseMode` | :ref:`mouse_mode` | + +----------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`use_accumulated_input` | + +----------------------------------------+--------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -379,6 +383,40 @@ Help cursor. Usually a question mark. Property Descriptions --------------------- +.. _class_Input_property_emulate_mouse_from_touch: + +.. rst-class:: classref-property + +:ref:`bool` **emulate_mouse_from_touch** + +.. rst-class:: classref-property-setget + +- void **set_emulate_mouse_from_touch** **(** :ref:`bool` value **)** +- :ref:`bool` **is_emulating_mouse_from_touch** **(** **)** + +If ``true``, sends mouse input events when tapping or swiping on the touchscreen. See also :ref:`ProjectSettings.input_devices/pointing/emulate_mouse_from_touch`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Input_property_emulate_touch_from_mouse: + +.. rst-class:: classref-property + +:ref:`bool` **emulate_touch_from_mouse** + +.. rst-class:: classref-property-setget + +- void **set_emulate_touch_from_mouse** **(** :ref:`bool` value **)** +- :ref:`bool` **is_emulating_touch_from_mouse** **(** **)** + +If ``true``, sends touch input events when clicking or dragging the mouse. See also :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Input_property_mouse_mode: .. rst-class:: classref-property diff --git a/classes/class_label.rst b/classes/class_label.rst index a2fc0ea1187..79232dd5722 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -41,6 +41,8 @@ Properties +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`clip_text` | ``false`` | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ellipsis_char` | ``"…"`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``0`` | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | |bitfield|\<:ref:`JustificationFlag`\> | :ref:`justification_flags` | ``163`` | @@ -173,6 +175,23 @@ If ``true``, the Label only shows the text that fits inside its bounding rectang ---- +.. _class_Label_property_ellipsis_char: + +.. rst-class:: classref-property + +:ref:`String` **ellipsis_char** = ``"…"`` + +.. rst-class:: classref-property-setget + +- void **set_ellipsis_char** **(** :ref:`String` value **)** +- :ref:`String` **get_ellipsis_char** **(** **)** + +Ellipsis character used for text clipping. + +.. rst-class:: classref-item-separator + +---- + .. _class_Label_property_horizontal_alignment: .. rst-class:: classref-property diff --git a/classes/class_navigationagent2d.rst b/classes/class_navigationagent2d.rst index c9dbd0af47a..8a3e1024762 100644 --- a/classes/class_navigationagent2d.rst +++ b/classes/class_navigationagent2d.rst @@ -153,7 +153,7 @@ Signals **link_reached** **(** :ref:`Dictionary` details **)** -Notifies when a navigation link has been reached. +Signals that the agent reached a navigation link. Emitted when the agent moves within :ref:`path_desired_distance` of the next position of the path when that position is a navigation link. The details dictionary may contain the following keys depending on the value of :ref:`path_metadata_flags`: @@ -179,7 +179,9 @@ The details dictionary may contain the following keys depending on the value of **navigation_finished** **(** **)** -Emitted once per loaded path when the agent internal navigation path index reaches the last index of the loaded path array. The agent internal navigation path index can be received with :ref:`get_current_navigation_path_index`. +Signals that the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. This signal is emitted only once per loaded path. + +This signal will be emitted just after :ref:`target_reached` when the target is reachable. .. rst-class:: classref-item-separator @@ -209,7 +211,11 @@ Emitted when the agent had to update the loaded path: **target_reached** **(** **)** -Emitted once per loaded path when the agent's global position is the first time within :ref:`target_desired_distance` to the :ref:`target_position`. +Signals that the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance` of the :ref:`target_position`. This signal is emitted only once per loaded path. + +This signal will be emitted just before :ref:`navigation_finished` when the target is reachable. + +It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position`. .. rst-class:: classref-item-separator @@ -233,7 +239,7 @@ Notifies when the collision avoidance velocity is calculated. Emitted when :ref: **waypoint_reached** **(** :ref:`Dictionary` details **)** -Notifies when a waypoint along the path has been reached. +Signals that the agent reached a waypoint. Emitted when the agent moves within :ref:`path_desired_distance` of the next position of the path. The details dictionary may contain the following keys depending on the value of :ref:`path_metadata_flags`: @@ -486,7 +492,7 @@ The distance to search for other agents. - void **set_path_desired_distance** **(** :ref:`float` value **)** - :ref:`float` **get_path_desired_distance** **(** **)** -The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the next point on each physics frame update. +The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to it leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot the distance to the next point on each physics frame update. .. rst-class:: classref-item-separator @@ -590,7 +596,11 @@ Does not affect normal pathfinding. To change an actor's pathfinding radius bake - void **set_target_desired_distance** **(** :ref:`float` value **)** - :ref:`float` **get_target_desired_distance** **(** **)** -The distance threshold before the final target point is considered to be reached. This allows agents to not have to hit the point of the final target exactly, but only to reach its general area. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the final target point on each physics frame update. +The distance threshold before the target is considered to be reached. On reaching the target, :ref:`target_reached` is emitted and navigation ends (see :ref:`is_navigation_finished` and :ref:`navigation_finished`). + +You can make navigation end early by setting this property to a value greater than :ref:`path_desired_distance` (navigation will end before reaching the last waypoint). + +You can also make navigation end closer to the target than each individual path position by setting this property to a value lower than :ref:`path_desired_distance` (navigation won't immediately end when reaching the last waypoint). However, if the value set is too low, the agent will be stuck in a repath loop because it will constantly overshoot the distance to the target on each physics frame update. .. rst-class:: classref-item-separator @@ -807,9 +817,9 @@ Returns the :ref:`RID` of this agent on the :ref:`NavigationServer2D< :ref:`bool` **is_navigation_finished** **(** **)** -Returns ``true`` if the end of the currently loaded navigation path has been reached. +Returns ``true`` if the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. -\ **Note:** While true prefer to stop calling update functions like :ref:`get_next_path_position`. This avoids jittering the standing agent due to calling repeated path updates. +\ **Note:** While ``true`` prefer to stop calling update functions like :ref:`get_next_path_position`. This avoids jittering the standing agent due to calling repeated path updates. .. rst-class:: classref-item-separator @@ -833,7 +843,7 @@ Returns ``true`` if :ref:`get_final_position` **is_target_reached** **(** **)** |const| -Returns true if :ref:`target_position` is reached. It may not always be possible to reach the target position. It should always be possible to reach the final position though. See :ref:`get_final_position`. +Returns ``true`` if the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance` of the :ref:`target_position`. It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position`. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationagent3d.rst b/classes/class_navigationagent3d.rst index abcba3bae7d..b15e59a97dc 100644 --- a/classes/class_navigationagent3d.rst +++ b/classes/class_navigationagent3d.rst @@ -159,7 +159,7 @@ Signals **link_reached** **(** :ref:`Dictionary` details **)** -Notifies when a navigation link has been reached. +Signals that the agent reached a navigation link. Emitted when the agent moves within :ref:`path_desired_distance` of the next position of the path when that position is a navigation link. The details dictionary may contain the following keys depending on the value of :ref:`path_metadata_flags`: @@ -185,7 +185,9 @@ The details dictionary may contain the following keys depending on the value of **navigation_finished** **(** **)** -Emitted once per loaded path when the agent internal navigation path index reaches the last index of the loaded path array. The agent internal navigation path index can be received with :ref:`get_current_navigation_path_index`. +Signals that the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. This signal is emitted only once per loaded path. + +This signal will be emitted just after :ref:`target_reached` when the target is reachable. .. rst-class:: classref-item-separator @@ -215,7 +217,11 @@ Emitted when the agent had to update the loaded path: **target_reached** **(** **)** -Emitted once per loaded path when the agent's global position is the first time within :ref:`target_desired_distance` to the :ref:`target_position`. +Signals that the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance` of the :ref:`target_position`. This signal is emitted only once per loaded path. + +This signal will be emitted just before :ref:`navigation_finished` when the target is reachable. + +It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position`. .. rst-class:: classref-item-separator @@ -239,7 +245,7 @@ Notifies when the collision avoidance velocity is calculated. Emitted when :ref: **waypoint_reached** **(** :ref:`Dictionary` details **)** -Notifies when a waypoint along the path has been reached. +Signals that the agent reached a waypoint. Emitted when the agent moves within :ref:`path_desired_distance` of the next position of the path. The details dictionary may contain the following keys depending on the value of :ref:`path_metadata_flags`: @@ -509,7 +515,7 @@ The distance to search for other agents. - void **set_path_desired_distance** **(** :ref:`float` value **)** - :ref:`float` **get_path_desired_distance** **(** **)** -The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the next point on each physics frame update. +The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to it leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot the distance to the next point on each physics frame update. .. rst-class:: classref-item-separator @@ -630,7 +636,11 @@ Does not affect normal pathfinding. To change an actor's pathfinding radius bake - void **set_target_desired_distance** **(** :ref:`float` value **)** - :ref:`float` **get_target_desired_distance** **(** **)** -The distance threshold before the final target point is considered to be reached. This allows agents to not have to hit the point of the final target exactly, but only to reach its general area. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the final target point on each physics frame update. +The distance threshold before the target is considered to be reached. On reaching the target, :ref:`target_reached` is emitted and navigation ends (see :ref:`is_navigation_finished` and :ref:`navigation_finished`). + +You can make navigation end early by setting this property to a value greater than :ref:`path_desired_distance` (navigation will end before reaching the last waypoint). + +You can also make navigation end closer to the target than each individual path position by setting this property to a value lower than :ref:`path_desired_distance` (navigation won't immediately end when reaching the last waypoint). However, if the value set is too low, the agent will be stuck in a repath loop because it will constantly overshoot the distance to the target on each physics frame update. .. rst-class:: classref-item-separator @@ -866,9 +876,9 @@ Returns the :ref:`RID` of this agent on the :ref:`NavigationServer3D< :ref:`bool` **is_navigation_finished** **(** **)** -Returns ``true`` if the end of the currently loaded navigation path has been reached. +Returns ``true`` if the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. -\ **Note:** While true prefer to stop calling update functions like :ref:`get_next_path_position`. This avoids jittering the standing agent due to calling repeated path updates. +\ **Note:** While ``true`` prefer to stop calling update functions like :ref:`get_next_path_position`. This avoids jittering the standing agent due to calling repeated path updates. .. rst-class:: classref-item-separator @@ -892,7 +902,7 @@ Returns ``true`` if :ref:`get_final_position` **is_target_reached** **(** **)** |const| -Returns true if :ref:`target_position` is reached. It may not always be possible to reach the target position. It should always be possible to reach the final position though. See :ref:`get_final_position`. +Returns ``true`` if the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance` of the :ref:`target_position`. It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position`. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationlink2d.rst b/classes/class_navigationlink2d.rst index d7da9c51b34..b1c02aa3997 100644 --- a/classes/class_navigationlink2d.rst +++ b/classes/class_navigationlink2d.rst @@ -67,6 +67,8 @@ Methods +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_global_end_position` **(** :ref:`Vector2` position **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_global_start_position` **(** :ref:`Vector2` position **)** | @@ -251,6 +253,18 @@ Returns whether or not the specified layer of the :ref:`navigation_layers` **get_rid** **(** **)** |const| + +Returns the :ref:`RID` of this link on the :ref:`NavigationServer2D`. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationLink2D_method_set_global_end_position: .. rst-class:: classref-method diff --git a/classes/class_navigationlink3d.rst b/classes/class_navigationlink3d.rst index 9ed2fb436cd..6b9e96b0e5e 100644 --- a/classes/class_navigationlink3d.rst +++ b/classes/class_navigationlink3d.rst @@ -67,6 +67,8 @@ Methods +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_global_end_position` **(** :ref:`Vector3` position **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_global_start_position` **(** :ref:`Vector3` position **)** | @@ -251,6 +253,18 @@ Returns whether or not the specified layer of the :ref:`navigation_layers` **get_rid** **(** **)** |const| + +Returns the :ref:`RID` of this link on the :ref:`NavigationServer3D`. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationLink3D_method_set_global_end_position: .. rst-class:: classref-method diff --git a/classes/class_navigationregion2d.rst b/classes/class_navigationregion2d.rst index 23624ff31ce..860ed9d6adf 100644 --- a/classes/class_navigationregion2d.rst +++ b/classes/class_navigationregion2d.rst @@ -85,6 +85,8 @@ Methods +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_region_rid` **(** **)** |const| | +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_avoidance_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | @@ -327,6 +329,20 @@ Returns the current navigation map :ref:`RID` used by this region. :ref:`RID` **get_region_rid** **(** **)** |const| +Returns the :ref:`RID` of this region on the :ref:`NavigationServer2D`. + +\ *Deprecated.* Use :ref:`get_rid` instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationRegion2D_method_get_rid: + +.. rst-class:: classref-method + +:ref:`RID` **get_rid** **(** **)** |const| + Returns the :ref:`RID` of this region on the :ref:`NavigationServer2D`. Combined with :ref:`NavigationServer2D.map_get_closest_point_owner` can be used to identify the **NavigationRegion2D** closest to a point on the merged navigation map. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationregion3d.rst b/classes/class_navigationregion3d.rst index d600a0f937d..7133ffcbdde 100644 --- a/classes/class_navigationregion3d.rst +++ b/classes/class_navigationregion3d.rst @@ -79,6 +79,8 @@ Methods +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_region_rid` **(** **)** |const| | +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | @@ -271,6 +273,20 @@ Returns the current navigation map :ref:`RID` used by this region. :ref:`RID` **get_region_rid** **(** **)** |const| +Returns the :ref:`RID` of this region on the :ref:`NavigationServer3D`. + +\ *Deprecated.* Use :ref:`get_rid` instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationRegion3D_method_get_rid: + +.. rst-class:: classref-method + +:ref:`RID` **get_rid** **(** **)** |const| + Returns the :ref:`RID` of this region on the :ref:`NavigationServer3D`. Combined with :ref:`NavigationServer3D.map_get_closest_point_owner` can be used to identify the **NavigationRegion3D** closest to a point on the merged navigation map. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationserver2d.rst b/classes/class_navigationserver2d.rst index 19efc01bb7a..6342087b34e 100644 --- a/classes/class_navigationserver2d.rst +++ b/classes/class_navigationserver2d.rst @@ -165,6 +165,8 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector2Array` | :ref:`map_get_path` **(** :ref:`RID` map, :ref:`Vector2` origin, :ref:`Vector2` destination, :ref:`bool` optimize, :ref:`int` navigation_layers=1 **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`map_get_random_point` **(** :ref:`RID` map, :ref:`int` navigation_layers, :ref:`bool` uniformly **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID[]` | :ref:`map_get_regions` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`map_get_use_edge_connections` **(** :ref:`RID` map **)** |const| | @@ -227,6 +229,8 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`region_get_owner_id` **(** :ref:`RID` region **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`region_get_random_point` **(** :ref:`RID` region, :ref:`int` navigation_layers, :ref:`bool` uniformly **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`region_get_travel_cost` **(** :ref:`RID` region **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`region_get_use_edge_connections` **(** :ref:`RID` region **)** |const| | @@ -974,6 +978,22 @@ Returns the navigation path to reach the destination from the origin. ``navigati ---- +.. _class_NavigationServer2D_method_map_get_random_point: + +.. rst-class:: classref-method + +:ref:`Vector2` **map_get_random_point** **(** :ref:`RID` map, :ref:`int` navigation_layers, :ref:`bool` uniformly **)** |const| + +Returns a random position picked from all map region polygons with matching ``navigation_layers``. + +If ``uniformly`` is ``true``, all map regions, polygons, and faces are weighted by their surface area (slower). + +If ``uniformly`` is ``false``, just a random region and a random polygon are picked (faster). + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_map_get_regions: .. rst-class:: classref-method @@ -1350,6 +1370,22 @@ Returns the ``ObjectID`` of the object which manages this region. ---- +.. _class_NavigationServer2D_method_region_get_random_point: + +.. rst-class:: classref-method + +:ref:`Vector2` **region_get_random_point** **(** :ref:`RID` region, :ref:`int` navigation_layers, :ref:`bool` uniformly **)** |const| + +Returns a random position picked from all region polygons with matching ``navigation_layers``. + +If ``uniformly`` is ``true``, all region polygons and faces are weighted by their surface area (slower). + +If ``uniformly`` is ``false``, just a random polygon and face is picked (faster). + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_region_get_travel_cost: .. rst-class:: classref-method diff --git a/classes/class_navigationserver3d.rst b/classes/class_navigationserver3d.rst index 6f1338dff4f..599c493464c 100644 --- a/classes/class_navigationserver3d.rst +++ b/classes/class_navigationserver3d.rst @@ -179,6 +179,8 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`map_get_path` **(** :ref:`RID` map, :ref:`Vector3` origin, :ref:`Vector3` destination, :ref:`bool` optimize, :ref:`int` navigation_layers=1 **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`map_get_random_point` **(** :ref:`RID` map, :ref:`int` navigation_layers, :ref:`bool` uniformly **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID[]` | :ref:`map_get_regions` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`map_get_up` **(** :ref:`RID` map **)** |const| | @@ -255,6 +257,8 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`region_get_owner_id` **(** :ref:`RID` region **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`region_get_random_point` **(** :ref:`RID` region, :ref:`int` navigation_layers, :ref:`bool` uniformly **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`region_get_travel_cost` **(** :ref:`RID` region **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`region_get_use_edge_connections` **(** :ref:`RID` region **)** |const| | @@ -1191,6 +1195,22 @@ Returns the navigation path to reach the destination from the origin. ``navigati ---- +.. _class_NavigationServer3D_method_map_get_random_point: + +.. rst-class:: classref-method + +:ref:`Vector3` **map_get_random_point** **(** :ref:`RID` map, :ref:`int` navigation_layers, :ref:`bool` uniformly **)** |const| + +Returns a random position picked from all map region polygons with matching ``navigation_layers``. + +If ``uniformly`` is ``true``, all map regions, polygons, and faces are weighted by their surface area (slower). + +If ``uniformly`` is ``false``, just a random region and a random polygon are picked (faster). + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_map_get_regions: .. rst-class:: classref-method @@ -1653,6 +1673,22 @@ Returns the ``ObjectID`` of the object which manages this region. ---- +.. _class_NavigationServer3D_method_region_get_random_point: + +.. rst-class:: classref-method + +:ref:`Vector3` **region_get_random_point** **(** :ref:`RID` region, :ref:`int` navigation_layers, :ref:`bool` uniformly **)** |const| + +Returns a random position picked from all region polygons with matching ``navigation_layers``. + +If ``uniformly`` is ``true``, all region polygons and faces are weighted by their surface area (slower). + +If ``uniformly`` is ``false``, just a random polygon and face is picked (faster). + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_region_get_travel_cost: .. rst-class:: classref-method diff --git a/classes/class_openxrinterface.rst b/classes/class_openxrinterface.rst index d9284235c41..ae5422bbc96 100644 --- a/classes/class_openxrinterface.rst +++ b/classes/class_openxrinterface.rst @@ -557,6 +557,8 @@ The display refresh rate for the current HMD. Only functional if this feature is Enable dynamic foveation adjustment, the interface must be initialized before this is accessible. If enabled foveation will automatically adjusted between low and :ref:`foveation_level`. +\ **Note:** Only works on compatibility renderer. + .. rst-class:: classref-item-separator ---- @@ -574,6 +576,8 @@ Enable dynamic foveation adjustment, the interface must be initialized before th Set foveation level from 0 (off) to 3 (high), the interface must be initialized before this is accessible. +\ **Note:** Only works on compatibility renderer. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_os.rst b/classes/class_os.rst index dd1a56e7484..855b9a91192 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -215,6 +215,14 @@ The Vulkan rendering driver. It requires Vulkan 1.0 support and automatically us The OpenGL 3 rendering driver. It uses OpenGL 3.3 Core Profile on desktop platforms, OpenGL ES 3.0 on mobile devices, and WebGL 2.0 on Web. +.. _class_OS_constant_RENDERING_DRIVER_D3D12: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderingDriver` **RENDERING_DRIVER_D3D12** = ``2`` + +The Direct3D 12 rendering driver. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_panoramaskymaterial.rst b/classes/class_panoramaskymaterial.rst index d1208073531..865d2dfa9cd 100644 --- a/classes/class_panoramaskymaterial.rst +++ b/classes/class_panoramaskymaterial.rst @@ -33,11 +33,13 @@ Properties .. table:: :widths: auto - +-----------------------------------+--------------------------------------------------------------+----------+ - | :ref:`bool` | :ref:`filter` | ``true`` | - +-----------------------------------+--------------------------------------------------------------+----------+ - | :ref:`Texture2D` | :ref:`panorama` | | - +-----------------------------------+--------------------------------------------------------------+----------+ + +-----------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`energy_multiplier` | ``1.0`` | + +-----------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`filter` | ``true`` | + +-----------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`Texture2D` | :ref:`panorama` | | + +-----------------------------------+--------------------------------------------------------------------------------+----------+ .. rst-class:: classref-section-separator @@ -48,6 +50,23 @@ Properties Property Descriptions --------------------- +.. _class_PanoramaSkyMaterial_property_energy_multiplier: + +.. rst-class:: classref-property + +:ref:`float` **energy_multiplier** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_energy_multiplier** **(** :ref:`float` value **)** +- :ref:`float` **get_energy_multiplier** **(** **)** + +The sky's overall brightness multiplier. Higher values result in a brighter sky. + +.. rst-class:: classref-item-separator + +---- + .. _class_PanoramaSkyMaterial_property_filter: .. rst-class:: classref-property diff --git a/classes/class_proceduralskymaterial.rst b/classes/class_proceduralskymaterial.rst index 33002aeb0ef..8fd0a149810 100644 --- a/classes/class_proceduralskymaterial.rst +++ b/classes/class_proceduralskymaterial.rst @@ -33,6 +33,8 @@ Properties .. table:: :widths: auto + +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`float` | :ref:`energy_multiplier` | ``1.0`` | +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ | :ref:`Color` | :ref:`ground_bottom_color` | ``Color(0.2, 0.169, 0.133, 1)`` | +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ @@ -70,6 +72,23 @@ Properties Property Descriptions --------------------- +.. _class_ProceduralSkyMaterial_property_energy_multiplier: + +.. rst-class:: classref-property + +:ref:`float` **energy_multiplier** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_energy_multiplier** **(** :ref:`float` value **)** +- :ref:`float` **get_energy_multiplier** **(** **)** + +The sky's overall brightness multiplier. Higher values result in a brighter sky. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProceduralSkyMaterial_property_ground_bottom_color: .. rst-class:: classref-property diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 6236f903fb1..7d9e570ae58 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -1453,6 +1453,12 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`rendering/renderer/rendering_method.web` | ``"gl_compatibility"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/rendering_device/d3d12/max_misc_descriptors_per_frame` | ``512`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/rendering_device/d3d12/max_resource_descriptors_per_frame` | ``16384`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/rendering_device/d3d12/max_sampler_descriptors_per_frame` | ``1024`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`rendering/rendering_device/driver` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`rendering/rendering_device/driver.android` | | @@ -10628,6 +10634,48 @@ Override for :ref:`rendering/renderer/rendering_method` **rendering/rendering_device/d3d12/max_misc_descriptors_per_frame** = ``512`` + +The number of entries in the miscellaneous descriptors heap the Direct3D 12 rendering driver uses each frame, used for various operations like clearing a texture. + +Depending on the complexity of scenes, this value may be lowered or may need to be raised. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_rendering/rendering_device/d3d12/max_resource_descriptors_per_frame: + +.. rst-class:: classref-property + +:ref:`int` **rendering/rendering_device/d3d12/max_resource_descriptors_per_frame** = ``16384`` + +The number of entries in the resource descriptors heap the Direct3D 12 rendering driver uses each frame, used for most rendering operations. + +Depending on the complexity of scenes, this value may be lowered or may need to be raised. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_rendering/rendering_device/d3d12/max_sampler_descriptors_per_frame: + +.. rst-class:: classref-property + +:ref:`int` **rendering/rendering_device/d3d12/max_sampler_descriptors_per_frame** = ``1024`` + +The number of entries in the sampler descriptors heap the Direct3D 12 rendering driver uses each frame, used for most rendering operations. + +Depending on the complexity of scenes, this value may be lowered or may need to be raised. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/rendering_device/driver: .. rst-class:: classref-property @@ -11273,6 +11321,8 @@ Specify whether OpenXR should be configured for an HMD or a hand held device. If true and foveation is supported, will automatically adjust foveation level based on framerate up to the level set on :ref:`xr/openxr/foveation_level`. +\ **Note:** Only works on compatibility renderer. + .. rst-class:: classref-item-separator ---- @@ -11285,6 +11335,8 @@ If true and foveation is supported, will automatically adjust foveation level ba Applied foveation level if supported: 0 = off, 1 = low, 2 = medium, 3 = high. +\ **Note:** Only works on compatibility renderer. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_renderingserver.rst b/classes/class_renderingserver.rst index dbe725f0eb9..9ee9fb2a767 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -267,6 +267,8 @@ Methods +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RenderingDevice` | :ref:`create_local_rendering_device` **(** **)** |const| | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`debug_canvas_item_get_rect` **(** :ref:`RID` item **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`decal_create` **(** **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`decal_set_albedo_mix` **(** :ref:`RID` decal, :ref:`float` albedo_mix **)** | @@ -3186,11 +3188,19 @@ Visible render pass (excluding shadows). Shadow render pass. Objects will be rendered several times depending on the number of amounts of lights with shadows and the number of directional shadow splits. +.. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_TYPE_CANVAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportRenderInfoType` **VIEWPORT_RENDER_INFO_TYPE_CANVAS** = ``2`` + +Canvas item rendering. This includes all 2D rendering. + .. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_TYPE_MAX: .. rst-class:: classref-enumeration-constant -:ref:`ViewportRenderInfoType` **VIEWPORT_RENDER_INFO_TYPE_MAX** = ``2`` +:ref:`ViewportRenderInfoType` **VIEWPORT_RENDER_INFO_TYPE_MAX** = ``3`` Represents the size of the :ref:`ViewportRenderInfoType` enum. @@ -4630,7 +4640,7 @@ Uses the default filter mode for this :ref:`Viewport`. :ref:`CanvasItemTextureFilter` **CANVAS_ITEM_TEXTURE_FILTER_NEAREST** = ``1`` -The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. +The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_LINEAR: @@ -4638,7 +4648,7 @@ The texture filter reads from the nearest pixel only. The simplest and fastest m :ref:`CanvasItemTextureFilter` **CANVAS_ITEM_TEXTURE_FILTER_LINEAR** = ``2`` -The texture filter blends between the nearest 4 pixels. Use this when you want to avoid a pixelated style, but do not want mipmaps. +The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: @@ -4646,7 +4656,9 @@ The texture filter blends between the nearest 4 pixels. Use this when you want t :ref:`CanvasItemTextureFilter` **CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS** = ``3`` -The texture filter reads from the nearest pixel in the nearest mipmap. The fastest way to read from textures with mipmaps. +The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look pixelated from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: @@ -4654,7 +4666,9 @@ The texture filter reads from the nearest pixel in the nearest mipmap. The faste :ref:`CanvasItemTextureFilter` **CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS** = ``4`` -The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. +The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look smooth from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: @@ -4662,7 +4676,9 @@ The texture filter blends between the nearest 4 pixels and between the nearest 2 :ref:`CanvasItemTextureFilter` **CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC** = ``5`` -The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. +The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. + +\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS` is usually more appropriate in this case. .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: @@ -4670,7 +4686,9 @@ The texture filter reads from the nearest pixel, but selects a mipmap based on t :ref:`CanvasItemTextureFilter` **CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC** = ``6`` -The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. +The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. + +\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS` is usually more appropriate in this case. .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_MAX: @@ -6666,6 +6684,20 @@ Creates a RenderingDevice that can be used to do draw and compute operations on ---- +.. _class_RenderingServer_method_debug_canvas_item_get_rect: + +.. rst-class:: classref-method + +:ref:`Rect2` **debug_canvas_item_get_rect** **(** :ref:`RID` item **)** + +Returns the bounding rectangle for a canvas item in local space, as calculated by the renderer. This bound is used internally for culling. + +\ **Warning:** This function is intended for debugging in the editor, and will pass through and return a zero :ref:`Rect2` in exported projects. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_decal_create: .. rst-class:: classref-method @@ -7238,7 +7270,7 @@ Sets the size of the fog volume when shape is :ref:`FOG_VOLUME_SHAPE_ELLIPSOID` swap_buffers=true, :ref:`float` frame_step=0.0 **)** -Forces redrawing of all viewports at once. +Forces redrawing of all viewports at once. Must be called from the main thread. .. rst-class:: classref-item-separator diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index 7dcb7d56e0b..d155d61132f 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -93,6 +93,8 @@ Methods +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_node_count` **(** **)** |const| | +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_node_count_in_group` **(** :ref:`StringName` group **)** |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node[]` | :ref:`get_nodes_in_group` **(** :ref:`StringName` group **)** | +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Tween[]` | :ref:`get_processed_tweens` **(** **)** | @@ -512,7 +514,7 @@ Changes the running scene to the one at the given ``path``, after loading it int Returns :ref:`@GlobalScope.OK` on success, :ref:`@GlobalScope.ERR_CANT_OPEN` if the ``path`` cannot be loaded into a :ref:`PackedScene`, or :ref:`@GlobalScope.ERR_CANT_CREATE` if that scene cannot be instantiated. -\ **Note:** The new scene node is added to the tree at the end of the frame. This ensures that both scenes aren't running at the same time, while still freeing the previous scene in a safe way similar to :ref:`Node.queue_free`. As such, you won't be able to access the loaded scene immediately after the :ref:`change_scene_to_file` call. +\ **Note:** See :ref:`change_scene_to_packed` for details on the order of operations. .. rst-class:: classref-item-separator @@ -528,7 +530,13 @@ Changes the running scene to a new instance of the given :ref:`PackedScene` on success, :ref:`@GlobalScope.ERR_CANT_CREATE` if the scene cannot be instantiated, or :ref:`@GlobalScope.ERR_INVALID_PARAMETER` if the scene is invalid. -\ **Note:** The new scene node is added to the tree at the end of the frame. You won't be able to access it immediately after the :ref:`change_scene_to_packed` call. +\ **Note:** Operations happen in the following order when :ref:`change_scene_to_packed` is called: + +1. The current scene node is immediately removed from the tree. From that point, :ref:`Node.get_tree` called on the current (outgoing) scene will return ``null``. :ref:`current_scene` will be ``null``, too, because the new scene is not available yet. + +2. At the end of the frame, the formerly current scene, already removed from the tree, will be deleted (freed from memory) and then the new scene will be instantiated and added to the tree. :ref:`Node.get_tree` and :ref:`current_scene` will be back to working as usual. + +This ensures that both scenes aren't running at the same time, while still freeing the previous scene in a safe way similar to :ref:`Node.queue_free`. .. rst-class:: classref-item-separator @@ -641,6 +649,18 @@ Returns the number of nodes in this **SceneTree**. ---- +.. _class_SceneTree_method_get_node_count_in_group: + +.. rst-class:: classref-method + +:ref:`int` **get_node_count_in_group** **(** :ref:`StringName` group **)** |const| + +Returns the number of nodes assigned to the given group. + +.. rst-class:: classref-item-separator + +---- + .. _class_SceneTree_method_get_nodes_in_group: .. rst-class:: classref-method diff --git a/classes/class_textline.rst b/classes/class_textline.rst index f9c7092a718..0f69e797601 100644 --- a/classes/class_textline.rst +++ b/classes/class_textline.rst @@ -34,6 +34,8 @@ Properties +---------------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ | :ref:`Direction` | :ref:`direction` | ``0`` | +---------------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`ellipsis_char` | ``"…"`` | + +---------------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ | |bitfield|\<:ref:`JustificationFlag`\> | :ref:`flags` | ``3`` | +---------------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ | :ref:`Orientation` | :ref:`orientation` | ``0`` | @@ -136,6 +138,23 @@ Text writing direction. ---- +.. _class_TextLine_property_ellipsis_char: + +.. rst-class:: classref-property + +:ref:`String` **ellipsis_char** = ``"…"`` + +.. rst-class:: classref-property-setget + +- void **set_ellipsis_char** **(** :ref:`String` value **)** +- :ref:`String` **get_ellipsis_char** **(** **)** + +Ellipsis character used for text clipping. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextLine_property_flags: .. rst-class:: classref-property diff --git a/classes/class_textparagraph.rst b/classes/class_textparagraph.rst index a549c5f1cf3..20f8d6ddb5d 100644 --- a/classes/class_textparagraph.rst +++ b/classes/class_textparagraph.rst @@ -38,6 +38,8 @@ Properties +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`Direction` | :ref:`direction` | ``0`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`ellipsis_char` | ``"…"`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | |bitfield|\<:ref:`JustificationFlag`\> | :ref:`justification_flags` | ``163`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`max_lines_visible` | ``-1`` | @@ -204,6 +206,23 @@ Text writing direction. ---- +.. _class_TextParagraph_property_ellipsis_char: + +.. rst-class:: classref-property + +:ref:`String` **ellipsis_char** = ``"…"`` + +.. rst-class:: classref-property-setget + +- void **set_ellipsis_char** **(** :ref:`String` value **)** +- :ref:`String` **get_ellipsis_char** **(** **)** + +Ellipsis character used for text clipping. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextParagraph_property_justification_flags: .. rst-class:: classref-property diff --git a/classes/class_textserver.rst b/classes/class_textserver.rst index 0ed6f5ef17e..0b544637d4b 100644 --- a/classes/class_textserver.rst +++ b/classes/class_textserver.rst @@ -326,6 +326,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`shaped_text_get_character_breaks` **(** :ref:`RID` shaped **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shaped_text_get_custom_ellipsis` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`shaped_text_get_custom_punctuation` **(** :ref:`RID` shaped **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`shaped_text_get_descent` **(** :ref:`RID` shaped **)** |const| | @@ -404,6 +406,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`shaped_text_set_bidi_override` **(** :ref:`RID` shaped, :ref:`Array` override **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shaped_text_set_custom_ellipsis` **(** :ref:`RID` shaped, :ref:`int` char **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`shaped_text_set_custom_punctuation` **(** :ref:`RID` shaped, :ref:`String` punct **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`shaped_text_set_direction` **(** :ref:`RID` shaped, :ref:`Direction` direction=0 **)** | @@ -3359,6 +3363,18 @@ Returns array of the composite character boundaries. ---- +.. _class_TextServer_method_shaped_text_get_custom_ellipsis: + +.. rst-class:: classref-method + +:ref:`int` **shaped_text_get_custom_ellipsis** **(** :ref:`RID` shaped **)** |const| + +Returns ellipsis character used for text clipping. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_shaped_text_get_custom_punctuation: .. rst-class:: classref-method @@ -3833,6 +3849,18 @@ Override ranges should cover full source text without overlaps. BiDi algorithm w ---- +.. _class_TextServer_method_shaped_text_set_custom_ellipsis: + +.. rst-class:: classref-method + +void **shaped_text_set_custom_ellipsis** **(** :ref:`RID` shaped, :ref:`int` char **)** + +Sets ellipsis character used for text clipping. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_shaped_text_set_custom_punctuation: .. rst-class:: classref-method diff --git a/classes/class_textserverextension.rst b/classes/class_textserverextension.rst index c83473dee3d..5eb1e35f4d0 100644 --- a/classes/class_textserverextension.rst +++ b/classes/class_textserverextension.rst @@ -330,6 +330,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`_shaped_text_get_character_breaks` **(** :ref:`RID` shaped **)** |virtual| |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_get_custom_ellipsis` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_shaped_text_get_custom_punctuation` **(** :ref:`RID` shaped **)** |virtual| |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_shaped_text_get_descent` **(** :ref:`RID` shaped **)** |virtual| |const| | @@ -406,6 +408,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_shaped_text_set_bidi_override` **(** :ref:`RID` shaped, :ref:`Array` override **)** |virtual| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_set_custom_ellipsis` **(** :ref:`RID` shaped, :ref:`int` char **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_shaped_text_set_custom_punctuation` **(** :ref:`RID` shaped, :ref:`String` punct **)** |virtual| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_shaped_text_set_direction` **(** :ref:`RID` shaped, :ref:`Direction` direction **)** |virtual| | @@ -2540,6 +2544,20 @@ void **_shaped_text_get_carets** **(** :ref:`RID` shaped, :ref:`int` **_shaped_text_get_custom_ellipsis** **(** :ref:`RID` shaped **)** |virtual| |const| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServerExtension_private_method__shaped_text_get_custom_punctuation: .. rst-class:: classref-method @@ -3072,6 +3090,20 @@ void **_shaped_text_set_bidi_override** **(** :ref:`RID` shaped, :ref ---- +.. _class_TextServerExtension_private_method__shaped_text_set_custom_ellipsis: + +.. rst-class:: classref-method + +void **_shaped_text_set_custom_ellipsis** **(** :ref:`RID` shaped, :ref:`int` char **)** |virtual| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServerExtension_private_method__shaped_text_set_custom_punctuation: .. rst-class:: classref-method diff --git a/classes/class_tiledata.rst b/classes/class_tiledata.rst index db8f6c0bb52..ef421bc9f7d 100644 --- a/classes/class_tiledata.rst +++ b/classes/class_tiledata.rst @@ -61,55 +61,55 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_collision_polygon` **(** :ref:`int` layer_id **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_collision_polygon_one_way_margin` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`get_collision_polygon_points` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_collision_polygons_count` **(** :ref:`int` layer_id **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_constant_angular_velocity` **(** :ref:`int` layer_id **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_constant_linear_velocity` **(** :ref:`int` layer_id **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_custom_data` **(** :ref:`String` layer_name **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_custom_data_by_layer_id` **(** :ref:`int` layer_id **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NavigationPolygon` | :ref:`get_navigation_polygon` **(** :ref:`int` layer_id **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`OccluderPolygon2D` | :ref:`get_occluder` **(** :ref:`int` layer_id **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_terrain_peering_bit` **(** :ref:`CellNeighbor` peering_bit **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_collision_polygon_one_way` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_collision_polygon` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_polygon_one_way` **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`bool` one_way **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_polygon_one_way_margin` **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`float` one_way_margin **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_polygon_points` **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`PackedVector2Array` polygon **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_polygons_count` **(** :ref:`int` layer_id, :ref:`int` polygons_count **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_constant_angular_velocity` **(** :ref:`int` layer_id, :ref:`float` velocity **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_constant_linear_velocity` **(** :ref:`int` layer_id, :ref:`Vector2` velocity **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_custom_data` **(** :ref:`String` layer_name, :ref:`Variant` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_custom_data_by_layer_id` **(** :ref:`int` layer_id, :ref:`Variant` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_polygon` **(** :ref:`int` layer_id, :ref:`NavigationPolygon` navigation_polygon **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_occluder` **(** :ref:`int` layer_id, :ref:`OccluderPolygon2D` occluder_polygon **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_terrain_peering_bit` **(** :ref:`CellNeighbor` peering_bit, :ref:`int` terrain **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_collision_polygon` **(** :ref:`int` layer_id **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_collision_polygon_one_way_margin` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_collision_polygon_points` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collision_polygons_count` **(** :ref:`int` layer_id **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_constant_angular_velocity` **(** :ref:`int` layer_id **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_constant_linear_velocity` **(** :ref:`int` layer_id **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_custom_data` **(** :ref:`String` layer_name **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_custom_data_by_layer_id` **(** :ref:`int` layer_id **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NavigationPolygon` | :ref:`get_navigation_polygon` **(** :ref:`int` layer_id, :ref:`bool` flip_h=false, :ref:`bool` flip_v=false, :ref:`bool` transpose=false **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OccluderPolygon2D` | :ref:`get_occluder` **(** :ref:`int` layer_id, :ref:`bool` flip_h=false, :ref:`bool` flip_v=false, :ref:`bool` transpose=false **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_terrain_peering_bit` **(** :ref:`CellNeighbor` peering_bit **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_collision_polygon_one_way` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_collision_polygon` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_polygon_one_way` **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`bool` one_way **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_polygon_one_way_margin` **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`float` one_way_margin **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_polygon_points` **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`PackedVector2Array` polygon **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_polygons_count` **(** :ref:`int` layer_id, :ref:`int` polygons_count **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_constant_angular_velocity` **(** :ref:`int` layer_id, :ref:`float` velocity **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_constant_linear_velocity` **(** :ref:`int` layer_id, :ref:`Vector2` velocity **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom_data` **(** :ref:`String` layer_name, :ref:`Variant` value **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom_data_by_layer_id` **(** :ref:`int` layer_id, :ref:`Variant` value **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_polygon` **(** :ref:`int` layer_id, :ref:`NavigationPolygon` navigation_polygon **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_occluder` **(** :ref:`int` layer_id, :ref:`OccluderPolygon2D` occluder_polygon **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_terrain_peering_bit` **(** :ref:`CellNeighbor` peering_bit, :ref:`int` terrain **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -429,10 +429,12 @@ Returns the custom data value for custom data layer with index ``layer_id``. .. rst-class:: classref-method -:ref:`NavigationPolygon` **get_navigation_polygon** **(** :ref:`int` layer_id **)** |const| +:ref:`NavigationPolygon` **get_navigation_polygon** **(** :ref:`int` layer_id, :ref:`bool` flip_h=false, :ref:`bool` flip_v=false, :ref:`bool` transpose=false **)** |const| Returns the navigation polygon of the tile for the TileSet navigation layer with index ``layer_id``. +\ ``flip_h``, ``flip_v``, and ``transpose`` allow transforming the returned polygon. + .. rst-class:: classref-item-separator ---- @@ -441,10 +443,12 @@ Returns the navigation polygon of the tile for the TileSet navigation layer with .. rst-class:: classref-method -:ref:`OccluderPolygon2D` **get_occluder** **(** :ref:`int` layer_id **)** |const| +:ref:`OccluderPolygon2D` **get_occluder** **(** :ref:`int` layer_id, :ref:`bool` flip_h=false, :ref:`bool` flip_v=false, :ref:`bool` transpose=false **)** |const| Returns the occluder polygon of the tile for the TileSet occlusion layer with index ``layer_id``. +\ ``flip_h``, ``flip_v``, and ``transpose`` allow transforming the returned polygon. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_videostreamplayer.rst b/classes/class_videostreamplayer.rst index 901b798505b..79901416ab2 100644 --- a/classes/class_videostreamplayer.rst +++ b/classes/class_videostreamplayer.rst @@ -23,8 +23,6 @@ A control used for playback of :ref:`VideoStream` resources. Supported video formats are `Ogg Theora `__ (``.ogv``, :ref:`VideoStreamTheora`) and any format exposed via a GDExtension plugin. -\ **Note:** Due to a bug, VideoStreamPlayer does not support localization remapping yet. - \ **Warning:** On Web, video playback *will* perform poorly due to missing architecture-specific assembly optimizations. .. rst-class:: classref-introduction-group diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index 62d8d61b1e3..dc4acada051 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -768,7 +768,7 @@ enum **DefaultCanvasItemTextureFilter**: :ref:`DefaultCanvasItemTextureFilter` **DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST** = ``0`` -The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. +The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR: @@ -776,7 +776,7 @@ The texture filter reads from the nearest pixel only. The simplest and fastest m :ref:`DefaultCanvasItemTextureFilter` **DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR** = ``1`` -The texture filter blends between the nearest 4 pixels. Use this when you want to avoid a pixelated style, but do not want mipmaps. +The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: @@ -784,7 +784,9 @@ The texture filter blends between the nearest 4 pixels. Use this when you want t :ref:`DefaultCanvasItemTextureFilter` **DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS** = ``2`` -The texture filter reads from the nearest pixel in the nearest mipmap. The fastest way to read from textures with mipmaps. +The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look smooth from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: @@ -792,7 +794,9 @@ The texture filter reads from the nearest pixel in the nearest mipmap. The faste :ref:`DefaultCanvasItemTextureFilter` **DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS** = ``3`` -The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. +The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look pixelated from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX: diff --git a/classes/class_visualshadernodetextureparameter.rst b/classes/class_visualshadernodetextureparameter.rst index 9ba2f704b75..b0baaedae4e 100644 --- a/classes/class_visualshadernodetextureparameter.rst +++ b/classes/class_visualshadernodetextureparameter.rst @@ -164,7 +164,7 @@ Sample the texture using the filter determined by the node this shader is attach :ref:`TextureFilter` **FILTER_NEAREST** = ``1`` -The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. +The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR: @@ -172,7 +172,7 @@ The texture filter reads from the nearest pixel only. The simplest and fastest m :ref:`TextureFilter` **FILTER_LINEAR** = ``2`` -The texture filter blends between the nearest four pixels. Use this for most cases where you want to avoid a pixelated style. +The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_VisualShaderNodeTextureParameter_constant_FILTER_NEAREST_MIPMAP: @@ -180,7 +180,9 @@ The texture filter blends between the nearest four pixels. Use this for most cas :ref:`TextureFilter` **FILTER_NEAREST_MIPMAP** = ``3`` -The texture filter reads from the nearest pixel in the nearest mipmap. This is the fastest way to read from textures with mipmaps. +The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look pixelated from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR_MIPMAP: @@ -188,7 +190,9 @@ The texture filter reads from the nearest pixel in the nearest mipmap. This is t :ref:`TextureFilter` **FILTER_LINEAR_MIPMAP** = ``4`` -The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. +The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look smooth from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_VisualShaderNodeTextureParameter_constant_FILTER_NEAREST_MIPMAP_ANISOTROPIC: @@ -196,9 +200,9 @@ The texture filter blends between the nearest 4 pixels and between the nearest 2 :ref:`TextureFilter` **FILTER_NEAREST_MIPMAP_ANISOTROPIC** = ``5`` -The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. -\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`FILTER_LINEAR_MIPMAP` is usually more appropriate. +\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`FILTER_NEAREST_MIPMAP` is usually more appropriate in this case. .. _class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR_MIPMAP_ANISOTROPIC: @@ -206,9 +210,9 @@ The texture filter reads from the nearest pixel, but selects a mipmap based on t :ref:`TextureFilter` **FILTER_LINEAR_MIPMAP_ANISOTROPIC** = ``6`` -The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. -\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`FILTER_LINEAR_MIPMAP` is usually more appropriate. +\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`FILTER_LINEAR_MIPMAP` is usually more appropriate in this case. .. _class_VisualShaderNodeTextureParameter_constant_FILTER_MAX: