瀏覽代碼

Merge branch 'master' into 4.0

Max Hilbrunner 2 年之前
父節點
當前提交
20e2417231
共有 79 個文件被更改,包括 1259 次插入566 次删除
  1. 68 0
      .github/workflows/sync_class_ref.yml
  2. 55 0
      _static/css/custom.css
  3. 16 16
      _templates/layout.html
  4. 30 1
      about/faq.rst
  5. 二進制
      about/img/troubleshooting_graphics_driver_sharpening.webp
  6. 64 68
      about/introduction.rst
  7. 9 12
      about/release_policy.rst
  8. 47 11
      about/troubleshooting.rst
  9. 2 1
      community/tutorials.rst
  10. 1 0
      conf.py
  11. 6 6
      contributing/development/code_style_guidelines.rst
  12. 2 2
      contributing/development/compiling/compiling_for_windows.rst
  13. 3 5
      contributing/development/compiling/cross-compiling_for_ios_on_linux.rst
  14. 15 34
      contributing/development/compiling/introduction_to_the_buildsystem.rst
  15. 1 1
      contributing/development/core_and_modules/binding_to_external_libraries.rst
  16. 4 4
      contributing/development/core_and_modules/custom_platform_ports.rst
  17. 2 2
      contributing/development/core_and_modules/custom_resource_format_loaders.rst
  18. 1 0
      contributing/development/debugging/index.rst
  19. 176 0
      contributing/development/debugging/using_sanitizers.rst
  20. 1 1
      contributing/development/editor/creating_icons.rst
  21. 1 1
      contributing/development/editor/introduction_to_editor_development.rst
  22. 86 34
      contributing/documentation/building_the_manual.rst
  23. 1 1
      contributing/documentation/contributing_to_the_documentation.rst
  24. 1 1
      contributing/workflow/testing_pull_requests.rst
  25. 1 1
      getting_started/first_2d_game/02.player_scene.rst
  26. 1 1
      getting_started/first_2d_game/03.coding_the_player.rst
  27. 0 1
      getting_started/first_3d_game/06.jump_and_squash.rst
  28. 2 2
      getting_started/first_3d_game/07.killing_player.rst
  29. 二進制
      getting_started/step_by_step/img/signals_13_signals_connection_icon.png
  30. 二進制
      getting_started/step_by_step/img/signals_13_signals_connection_icon.webp
  31. 二進制
      getting_started/step_by_step/img/signals_14_signals_connection_info.png
  32. 二進制
      getting_started/step_by_step/img/signals_14_signals_connection_info.webp
  33. 2 2
      getting_started/step_by_step/instancing.rst
  34. 1 1
      getting_started/step_by_step/nodes_and_scenes.rst
  35. 13 11
      getting_started/step_by_step/signals.rst
  36. 1 1
      make.bat
  37. 2 0
      requirements.txt
  38. 1 1
      tutorials/2d/2d_lights_and_shadows.rst
  39. 1 1
      tutorials/2d/canvas_layers.rst
  40. 19 1
      tutorials/3d/3d_rendering_limitations.rst
  41. 24 20
      tutorials/3d/environment_and_post_processing.rst
  42. 二進制
      tutorials/3d/img/3d_rendering_limitations_banding.webp
  43. 二進制
      tutorials/3d/img/3d_rendering_limitations_transparency_sorting.webp
  44. 二進制
      tutorials/3d/img/3d_rendering_limitations_z_fighting.webp
  45. 2 2
      tutorials/3d/introduction_to_3d.rst
  46. 24 24
      tutorials/3d/procedural_geometry/immediatemesh.rst
  47. 1 1
      tutorials/best_practices/logic_preferences.rst
  48. 2 2
      tutorials/editor/managing_editor_features.rst
  49. 9 3
      tutorials/export/exporting_for_android.rst
  50. 1 1
      tutorials/inputs/controllers_gamepads_joysticks.rst
  51. 17 7
      tutorials/inputs/custom_mouse_cursor.rst
  52. 1 1
      tutorials/inputs/inputevent.rst
  53. 17 6
      tutorials/navigation/navigation_introduction_2d.rst
  54. 17 5
      tutorials/navigation/navigation_introduction_3d.rst
  55. 34 23
      tutorials/navigation/navigation_using_navigationagents.rst
  56. 3 5
      tutorials/navigation/navigation_using_navigationmeshes.rst
  57. 87 64
      tutorials/networking/http_request_class.rst
  58. 二進制
      tutorials/networking/img/rest_api_scene.png
  59. 二進制
      tutorials/networking/img/rest_api_scene.webp
  60. 0 4
      tutorials/performance/using_multimesh.rst
  61. 1 1
      tutorials/performance/vertex_animation/animating_thousands_of_fish.rst
  62. 1 0
      tutorials/physics/index.rst
  63. 2 0
      tutorials/physics/large_world_coordinates.rst
  64. 166 0
      tutorials/physics/troubleshooting_physics_issues.rst
  65. 3 2
      tutorials/platform/android/android_plugin.rst
  66. 1 1
      tutorials/platform/consoles.rst
  67. 2 2
      tutorials/plugins/editor/making_plugins.rst
  68. 5 8
      tutorials/plugins/running_code_in_the_editor.rst
  69. 43 19
      tutorials/rendering/multiple_resolutions.rst
  70. 33 33
      tutorials/scripting/gdextension/gdextension_cpp_example.rst
  71. 6 6
      tutorials/scripting/gdscript/gdscript_documentation_comments.rst
  72. 12 6
      tutorials/shaders/advanced_postprocessing.rst
  73. 2 2
      tutorials/shaders/shader_reference/particle_shader.rst
  74. 89 80
      tutorials/shaders/shader_reference/spatial_shader.rst
  75. 1 1
      tutorials/ui/bbcode_in_richtextlabel.rst
  76. 15 11
      tutorials/xr/deploying_to_android.rst
  77. 二進制
      tutorials/xr/img/android_meta_quest.webp
  78. 二進制
      tutorials/xr/img/openxr_loader_asset_lib.webp
  79. 2 2
      tutorials/xr/xr_action_map.rst

+ 68 - 0
.github/workflows/sync_class_ref.yml

@@ -0,0 +1,68 @@
+name: Sync Class Reference
+
+on:
+  workflow_dispatch:
+  # Scheduled updates only run on the default/master branch.
+  schedule:
+    # Run it at night (European time) every Saturday.
+    # The offset is there to try and avoid the high load times.
+    - cron: '15 3 * * 6'
+
+# Make sure jobs cannot overlap.
+concurrency:
+  group: classref-sync-ci
+  cancel-in-progress: true
+
+jobs:
+  build:
+    name: Update class reference files based on the engine revision
+    runs-on: ubuntu-latest
+    env:
+      engine_rev: 'master'
+
+    steps:
+      - name: Checkout the documentation repository
+        uses: actions/checkout@v3
+
+      - name: Checkout the engine repository
+        uses: actions/checkout@v3
+        with:
+          repository: 'godotengine/godot'
+          # Use the appropriate branch for the documentation version.
+          ref: ${{ env.engine_rev }}
+          path: './.engine-src'
+
+      - name: Store the engine revision
+        id: 'engine'
+        run: |
+          cd ./.engine-src
+          hash=$(git rev-parse HEAD)
+          hash_short=$(git rev-parse --short HEAD)
+          echo "Checked out godotengine/godot at $hash"
+          echo "rev_hash=$hash" >> $GITHUB_OUTPUT
+          echo "rev_hash_short=$hash_short" >> $GITHUB_OUTPUT
+
+      - name: Remove old documentation
+        run: |
+          rm ./classes/class_*.rst
+
+      - name: Build new documentation
+        run: |
+          ./.engine-src/doc/tools/make_rst.py --color -o ./classes -l en ./.engine-src/doc/classes ./.engine-src/modules
+
+      - name: Submit a pull-request
+        uses: peter-evans/create-pull-request@v5
+        with:
+          commit-message: 'classref: Sync with current ${{ env.engine_rev }} branch (${{ steps.engine.outputs.rev_hash_short }})'
+          branch: 'classref/sync-${{ steps.engine.outputs.rev_hash_short }}'
+          add-paths: './classes'
+          delete-branch: true
+
+          # Configure the commit author.
+          author: 'Godot Organization <[email protected]>'
+          committer: 'Godot Organization <[email protected]>'
+
+          # Configure the pull-request.
+          title: 'classref: Sync with current ${{ env.engine_rev }} branch (${{ steps.engine.outputs.rev_hash_short }})'
+          body: 'Update Godot API online class reference to match the engine at https://github.com/godotengine/godot/commit/${{ steps.engine.outputs.rev_hash }} (`${{ env.engine_rev }}`).'
+          labels: 'area:class reference,bug,enhancement'

+ 55 - 0
_static/css/custom.css

@@ -103,6 +103,16 @@
     --highlight-operator-color: #666666;
     --highlight-operator-color: #666666;
     --highlight-string-color: #4070a0;
     --highlight-string-color: #4070a0;
 
 
+    --copybtn-background-color: #f6f8fa;
+    --copybtn-background-color-hover: #f3f4f6;
+    --copybtn-border-color: #d5d8da;
+    --copybtn-border-color-hover: #d5d8da;
+    --copybtn-icon-color: #57606a;
+    --copybtn-icon-color-success: #1a7f37;
+    --copybtn-tooltip-background-color: #24292f;
+    --copybtn-box-shadow: 0 1px 0 rgba(27,31,36,0.04), inset 0 1px 0 rgba(255,255,255,0.25);
+    --copybtn-border-color-success: #2da44e;
+    
     --contribute-background-color: #d7dee8;
     --contribute-background-color: #d7dee8;
     --contribute-text-color: #646e72;
     --contribute-text-color: #646e72;
 
 
@@ -221,6 +231,16 @@
         --highlight-operator-color: #abc8ff;
         --highlight-operator-color: #abc8ff;
         --highlight-string-color: #ffeca1;
         --highlight-string-color: #ffeca1;
 
 
+        --copybtn-background-color: #2a303c;
+        --copybtn-background-color-hover: #3e4450;
+        --copybtn-border-color: #3e4450;
+        --copybtn-border-color-hover: #8b949e;
+        --copybtn-icon-color: #8b949e;
+        --copybtn-icon-color-success: #3fb950;
+        --copybtn-tooltip-background-color: #6e7681;
+        --copybtn-box-shadow: 0 0 transparent, 0 0 transparent;
+        --copybtn-border-color-success: #238636;
+
         --contribute-background-color: #25282d;
         --contribute-background-color: #25282d;
         --contribute-text-color: #7f939b;
         --contribute-text-color: #7f939b;
 
 
@@ -1674,3 +1694,38 @@ p + .classref-constant {
 .wy-menu-vertical p.caption + ul.active {
 .wy-menu-vertical p.caption + ul.active {
     display: block;
     display: block;
 }
 }
+
+.highlight button.copybtn {
+    background-color: var(--copybtn-background-color);
+    border-color: var(--copybtn-border-color);
+    box-shadow: var(--copybtn-box-shadow);
+    width: 32px;
+    height: 32px;
+    right: 0;
+    top: 0;
+    margin: 12.25px;
+}
+.highlight button.copybtn:hover {
+    background-color: var(--copybtn-background-color-hover);
+    border-color: var(--copybtn-border-color-hover);
+}
+.highlight button.copybtn svg {
+    position: absolute;
+    left: 3.5px;
+    top: 3.5px;
+    color: var(--copybtn-icon-color);
+    pointer-events: none; 
+}
+.highlight button.copybtn.success {
+    border-color: var(--copybtn-border-color-success);
+    box-shadow: 0 0 0 0.2em rgb(52 208 88 / 40%);
+}
+.highlight button.copybtn.success svg {
+    color: var(--copybtn-icon-color-success);
+}
+.o-tooltip--left:after {
+    background-color: var(--copybtn-tooltip-background-color);
+    color: #ffffff;
+    border-radius: 6px;
+    padding: 0.5em 0.75em;
+}

+ 16 - 16
_templates/layout.html

@@ -28,14 +28,14 @@
 {%- block document %}
 {%- block document %}
 <div itemprop="articleBody">
 <div itemprop="articleBody">
   {% if godot_is_latest or godot_show_article_status %}
   {% if godot_is_latest or godot_show_article_status %}
-  <div class="admonition-grid {% if godot_is_latest and godot_show_article_status %}admonition-grid-2x{% endif %}">
+  <div class="admonition-grid">
     {% if godot_is_latest %}
     {% if godot_is_latest %}
     <div class="admonition attention latest-notice">
     <div class="admonition attention latest-notice">
-      <p class="first admonition-title">Attention</p>
+      <p class="first admonition-title">Attention: Here be dragons</p>
       <p>
       <p>
-        You are reading the <code class="docutils literal notranslate"><span class="pre">latest</span></code>
-        (unstable) version of this documentation, which may document features not available
-        or compatible with Godot 3.x.
+        This is the <code class="docutils literal notranslate"><span class="pre">latest</span></code>
+        (unstable) version of this documentation, which may document features
+        not available in or compatible with released stable versions of Godot.
       </p>
       </p>
       <p class="last latest-notice-link">
       <p class="last latest-notice-link">
         Checking the stable version of the documentation...
         Checking the stable version of the documentation...
@@ -43,23 +43,23 @@
     </div>
     </div>
     {% endif %}
     {% endif %}
 
 
-    {% if godot_show_article_status %}
+    {% if godot_show_article_status and not godot_is_latest %}
     <div class="admonition tip article-status">
     <div class="admonition tip article-status">
+      {% if meta and meta.get('article_outdated') == 'True' %}
       <p class="first admonition-title">Work in progress</p>
       <p class="first admonition-title">Work in progress</p>
       <p>
       <p>
-        Godot documentation is being updated to reflect the latest changes in version
-        <code class="docutils literal notranslate">{{ godot_version }}</code>. Some documentation pages may
-        still state outdated information. This banner will tell you if you're reading one of such pages.
+        The content of this page was not yet updated for Godot
+        <code class="docutils literal notranslate">{{ godot_version }}</code>
+        and may be <strong>outdated</strong>. If you know how to improve this page or you can confirm
+        that it's up to date, feel free to <a href="https://github.com/godotengine/godot-docs">open a pull request</a>.
       </p>
       </p>
+      {% else %}
+      <p class="first admonition-title">Up to date</p>
       <p>
       <p>
-        {% if meta and meta.get('article_outdated') == 'True' %}
-          The contents of this page can be <strong>outdated</strong>. If you know how to improve this page or you can confirm
-          that it's up to date, feel free to <a href="https://github.com/godotengine/godot-docs">open a pull request</a>.
-        {% else %}
-          The contents of this page are <strong>up to date</strong>. If you can still find outdated information, please
-          <a href="https://github.com/godotengine/godot-docs">open an issue</a>.
-        {% endif %}
+        This page is <strong>up to date</strong> for Godot <code class="docutils literal notranslate">{{ godot_version }}</code>.
+        If you still find outdated information, please <a href="https://github.com/godotengine/godot-docs">open an issue</a>.
       </p>
       </p>
+      {% endif %}
     </div>
     </div>
     {% endif %}
     {% endif %}
   </div>
   </div>

+ 30 - 1
about/faq.rst

@@ -478,6 +478,35 @@ This custom UI toolkit :ref:`can't be used as a library <doc_faq_use_godot_as_li
 but you can still
 but you can still
 :ref:`use Godot to create non-game applications by using the editor <doc_faq_non_game_applications>`.
 :ref:`use Godot to create non-game applications by using the editor <doc_faq_non_game_applications>`.
 
 
+.. _doc_faq_why_scons:
+
+Why does Godot use the SCons build system?
+------------------------------------------
+
+Godot uses the `SCons <https://www.scons.org/>`__ build system. There are no
+plans to switch to a different build system in the near future. There are many
+reasons why we have chosen SCons over other alternatives. For example:
+
+-  Godot can be compiled for a dozen different platforms: all PC
+   platforms, all mobile platforms, many consoles, and WebAssembly.
+-  Developers often need to compile for several of the platforms **at
+   the same time**, or even different targets of the same platform. They
+   can't afford reconfiguring and rebuilding the project each time.
+   SCons can do this with no sweat, without breaking the builds.
+-  SCons will *never* break a build no matter how many changes,
+   configurations, additions, removals etc.
+-  Godot's build process is not simple. Several files are generated by
+   code (binders), others are parsed (shaders), and others need to offer
+   customization (:ref:`modules <doc_custom_modules_in_cpp>`). This requires
+   complex logic which is easier to write in an actual programming language (like Python)
+   rather than using a mostly macro-based language only meant for building.
+-  Godot build process makes heavy use of cross-compiling tools. Each
+   platform has a specific detection process, and all these must be
+   handled as specific cases with special code written for each.
+
+Please try to keep an open mind and get at least a little familiar with SCons if
+you are planning to build Godot yourself.
+
 .. _doc_faq_why_not_stl:
 .. _doc_faq_why_not_stl:
 
 
 Why does Godot not use STL (Standard Template Library)?
 Why does Godot not use STL (Standard Template Library)?
@@ -547,7 +576,7 @@ such a case, you should consider a different approach to optimization.
 The vast majority of games do not need this and Godot provides handy helpers
 The vast majority of games do not need this and Godot provides handy helpers
 to do the job for most cases when you do.
 to do the job for most cases when you do.
 
 
-If a game needs to process such a large amount of objects, our recommendation 
+If a game needs to process such a large amount of objects, our recommendation
 is to use C++ and GDExtensions for performance-heavy tasks and GDScript (or C#)
 is to use C++ and GDExtensions for performance-heavy tasks and GDScript (or C#)
 for the rest of the game.
 for the rest of the game.
 
 

二進制
about/img/troubleshooting_graphics_driver_sharpening.webp


+ 64 - 68
about/introduction.rst

@@ -6,105 +6,101 @@ Introduction
 ::
 ::
 
 
     func _ready():
     func _ready():
-        $Label.text = "Hello world!"
+        print("Hello world!")
 
 
-Welcome to the official documentation of Godot Engine, the free and open source
+Welcome to the official documentation of **Godot Engine**, the free and open source
 community-driven 2D and 3D game engine! Behind this mouthful, you will find a
 community-driven 2D and 3D game engine! Behind this mouthful, you will find a
 powerful yet user-friendly tool that you can use to develop any kind of game,
 powerful yet user-friendly tool that you can use to develop any kind of game,
 for any platform and with no usage restriction whatsoever.
 for any platform and with no usage restriction whatsoever.
 
 
-This page gives a broad presentation of the engine and of the contents
-of this documentation, so that you know where to start if you are a beginner or
-where to look if you need info on a specific feature.
+This page gives a broad overview of the engine and of this documentation,
+so that you know where to start if you are a beginner or
+where to look if you need information on a specific feature.
 
 
 Before you start
 Before you start
 ----------------
 ----------------
 
 
 The :ref:`Tutorials and resources <doc_community_tutorials>` page lists
 The :ref:`Tutorials and resources <doc_community_tutorials>` page lists
 video tutorials contributed by the community. If you prefer video to text,
 video tutorials contributed by the community. If you prefer video to text,
-those may be worth a look.
+consider checking them out. Otherwise, :ref:`Getting Started <sec-learn>`
+is a great starting point.
 
 
 In case you have trouble with one of the tutorials or your project,
 In case you have trouble with one of the tutorials or your project,
 you can find help on the various :ref:`Community channels <doc_community_channels>`,
 you can find help on the various :ref:`Community channels <doc_community_channels>`,
-especially the Godot Discord community and Q&A.
+especially the Godot `Discord`_ community and
+`Q&A <https://godotengine.org/qa/>`_.
 
 
 About Godot Engine
 About Godot Engine
 ------------------
 ------------------
 
 
-A game engine is a complex tool, and it is therefore difficult to present Godot
-in a few words. Here's a quick synopsis, which you are free to reuse
-if you need a quick write-up about Godot Engine.
+A game engine is a complex tool and difficult to present in a few words.
+Here's a quick synopsis, which you are free to reuse
+if you need a quick write-up about Godot Engine:
 
 
     Godot Engine is a feature-packed, cross-platform game engine to create 2D
     Godot Engine is a feature-packed, cross-platform game engine to create 2D
     and 3D games from a unified interface. It provides a comprehensive set of
     and 3D games from a unified interface. It provides a comprehensive set of
-    common tools, so users can focus on making games without having to
-    reinvent the wheel. Games can be exported in one click to a number of
-    platforms, including the major desktop platforms (Linux, macOS, Windows)
-    as well as mobile (Android, iOS) and web-based (HTML5) platforms.
-
-    Godot is completely free and open source under the permissive MIT
-    license. No strings attached, no royalties, nothing. Users' games are
-    theirs, down to the last line of engine code. Godot's development is fully
-    independent and community-driven, empowering users to help shape their
-    engine to match their expectations. It is supported by the `Software
-    Freedom Conservancy <https://sfconservancy.org>`_ not-for-profit.
-
-For a more in-depth view of the engine, you are encouraged to read this
-documentation further, especially the :ref:`Getting Started <sec-learn>` series.
-
-About the documentation
------------------------
-
-This documentation is continuously written, corrected, edited, and revamped by
-members of the Godot Engine community. It is edited via text files in the
-`reStructuredText <http://www.sphinx-doc.org/en/stable/rest.html>`_ markup
-language and then compiled into a static website/offline document using the
-open source `Sphinx <http://www.sphinx-doc.org>`_ and `ReadTheDocs
-<https://readthedocs.org/>`_ tools.
-
-.. note:: You can contribute to Godot's documentation by opening issue tickets
-          or sending patches via pull requests on its GitHub
-          `source repository <https://github.com/godotengine/godot-docs>`_, or
-          translating it into your language on `Hosted Weblate
-          <https://hosted.weblate.org/projects/godot-engine/godot-docs/>`_.
-
-All the contents are under the permissive Creative Commons Attribution 3.0
-(`CC BY 3.0 <https://creativecommons.org/licenses/by/3.0/>`_) license, with
-attribution to "Juan Linietsky, Ariel Manzur and the Godot Engine community".
+    common tools, so that users can focus on making games without having to
+    reinvent the wheel. Games can be exported with one click to a number of
+    platforms, including the major desktop platforms (Linux, macOS, Windows),
+    mobile platforms (Android, iOS), as well as Web-based platforms and consoles.
+
+    Godot is completely free and open source under the :ref:`permissive MIT
+    license <doc_complying_with_licenses>`. No strings attached, no royalties,
+    nothing. Users' games are theirs, down to the last line of engine code.
+    Godot's development is fully independent and community-driven, empowering
+    users to help shape their engine to match their expectations.
+    It is supported by the `Godot Foundation <https://godot.foundation/>`_
+    not-for-profit.
+
 
 
 Organization of the documentation
 Organization of the documentation
 ---------------------------------
 ---------------------------------
 
 
-This documentation is organized in several sections with an impressively
-unbalanced distribution of contents – but the way it is split up should be
-relatively intuitive:
+This documentation is organized into several sections:
 
 
-- The **About** section contains this introduction as well as
-  the information about the engine, its history, its licensing, authors, etc. It
+- **About** contains this introduction as well as
+  information about the engine, its history, its licensing, authors, etc. It
   also contains the :ref:`doc_faq`.
   also contains the :ref:`doc_faq`.
-- The **Getting Started** section is the *raison d'être* of this
-  documentation, as it contains all the necessary information on using the
+- **Getting Started** contains all necessary information on using the
   engine to make games. It starts with the :ref:`Step by step
   engine to make games. It starts with the :ref:`Step by step
   <toc-learn-step_by_step>` tutorial which should be the entry point for all
   <toc-learn-step_by_step>` tutorial which should be the entry point for all
-  new users.
-- The **Manual** section can be read as needed,
+  new users. **This is the best place to start if you're new!**
+- The **Manual** can be read  or referenced as needed,
   in any order. It contains feature-specific tutorials and documentation.
   in any order. It contains feature-specific tutorials and documentation.
-- The **Contributing** section gives the information related to contributing to
-  the engine development, e.g. how to report bugs, help with the documentation, etc.
-  It also contains subsections intended for advanced users and contributors
-  to the engine development, with the information on compiling the engine,
-  contributing to the editor, or developing C++ modules.
-- The **Community** section is dedicated to the life of its community.
-  It points to various community channels like Godot Contributors Chat and
-  Discord and contains a list of recommended third-party tutorials outside
-  of this documentation.
-- Finally, the **Class reference** is the documentation of the Godot API,
-  which is also available directly within the engine's script editor. It is
-  generated automatically from a file in the main source repository, therefore
-  the generated files of the documentation are not meant to be modified. See
-  :ref:`doc_updating_the_class_reference` for details.
+- **Contributing** gives information related to contributing to
+  Godot, whether to the core engine, documentation, demos or other parts.
+  It describes how to report bugs, how contributor workflows are organized, etc.
+  It also contains sections intended for advanced users and contributors,
+  with information on compiling the engine, contributing to the editor,
+  or developing C++ modules.
+- **Community** is dedicated to the life of Godot's community.
+  It points to various community channels like the
+  `Godot Contributors Chat <https://chat.godotengine.org/>`_ and
+  `Discord`_ and contains a list of recommended third-party tutorials and
+  materials outside of this documentation.
+- Finally, the **Class reference** documents the full Godot API,
+  also available directly within the engine's script editor.
+  You can find information on all classes, functions, signals and so on here.
 
 
 In addition to this documentation, you may also want to take a look at the
 In addition to this documentation, you may also want to take a look at the
 various `Godot demo projects <https://github.com/godotengine/godot-demo-projects>`_.
 various `Godot demo projects <https://github.com/godotengine/godot-demo-projects>`_.
 
 
-Have fun reading and making games with Godot Engine!
+About this documentation
+------------------------
+
+Members of the Godot Engine community continuously write, correct, edit, and
+improve this documentation. We are always looking for more help. You can also
+contribute by opening Github issues or translating the documentation into your language.
+If you are interested in helping, see :ref:`Ways to contribute <doc_ways_to_contribute>`
+and :ref:`Writing documentation <doc_contributing_writing_documentation>`,
+or get in touch with the `Documentation team <https://godotengine.org/teams/#documentation>`_
+on `Godot Contributors Chat <https://chat.godotengine.org/>`_.
+
+All documentation content is licensed under the permissive Creative Commons Attribution 3.0
+(`CC BY 3.0 <https://creativecommons.org/licenses/by/3.0/>`_) license,
+with attribution to "*Juan Linietsky, Ariel Manzur, and the Godot Engine community*"
+unless otherwise noted.
+
+*Have fun reading and making games with Godot Engine!*
+
+.. _Discord: https://discord.gg/4JBkykG

+ 9 - 12
about/release_policy.rst

@@ -1,13 +1,11 @@
-:article_outdated: True
-
 .. _doc_release_policy:
 .. _doc_release_policy:
 
 
 Godot release policy
 Godot release policy
 ====================
 ====================
 
 
-Godot's release policy is in constant evolution. What is described below is
-intended to give a general idea of what to expect, but what will actually
-happen depends on the choices of core contributors, and the needs of the
+Godot's release policy is in constant evolution. The description below
+provides a general idea of what to expect, but what will actually
+happen depends on the choices of core contributors and the needs of the
 community at a given time.
 community at a given time.
 
 
 Godot versioning
 Godot versioning
@@ -30,15 +28,14 @@ term adapted to the complexity of a game engine:
   areas *may* happen in minor versions, but the vast majority of projects
   areas *may* happen in minor versions, but the vast majority of projects
   should not be affected or require significant porting work.
   should not be affected or require significant porting work.
 
 
-  The reason for this is that as a game engine, Godot covers many areas such
-  as rendering, physics, scripting, etc., and fixing bugs or implementing new
-  features in a given area may sometimes require changing the behavior of a
-  feature, or modifying the interface of a given class, even if the rest of
-  the engine API remains backwards compatible.
+  This is because Godot, as a game engine, covers many areas like rendering,
+  physics, and scripting. Fixing bugs or implementing new features in one area
+  might sometimes require changing a feature's behavior or modifying a class's
+  interface, even if the rest of the engine API remains backwards compatible.
 
 
 .. tip::
 .. tip::
 
 
-    Upgrading to a new minor version is therefore recommended for all users,
+    Upgrading to a new minor version is recommended for all users,
     but some testing is necessary to ensure that your project still behaves as
     but some testing is necessary to ensure that your project still behaves as
     expected.
     expected.
 
 
@@ -64,7 +61,7 @@ further developed for maintenance releases in a Git branch of the same name
 Release support timeline
 Release support timeline
 ------------------------
 ------------------------
 
 
-Stable branches are supported *at minimum* until the next stable branch is
+Stable branches are supported *at least* until the next stable branch is
 released and has received its first patch update. In practice, we support
 released and has received its first patch update. In practice, we support
 stable branches on a *best effort* basis for as long as they have active users
 stable branches on a *best effort* basis for as long as they have active users
 who need maintenance updates.
 who need maintenance updates.

+ 47 - 11
about/troubleshooting.rst

@@ -1,5 +1,3 @@
-:article_outdated: True
-
 .. _doc_troubleshooting:
 .. _doc_troubleshooting:
 
 
 Troubleshooting
 Troubleshooting
@@ -62,7 +60,7 @@ There are several workarounds for this:
 The editor or project takes a very long time to start
 The editor or project takes a very long time to start
 -----------------------------------------------------
 -----------------------------------------------------
 
 
-When using one of the the Vulkan-based renderers (Forward+ or Forward Mobile),
+When using one of the Vulkan-based renderers (Forward+ or Forward Mobile),
 the first startup is expected to be relatively long. This is because shaders
 the first startup is expected to be relatively long. This is because shaders
 need to be compiled before they can be cached. Shaders also need to be cached
 need to be compiled before they can be cached. Shaders also need to be cached
 again after updating Godot, after updating graphics drivers or after switching
 again after updating Godot, after updating graphics drivers or after switching
@@ -98,14 +96,52 @@ default values in the NVIDIA Control Panel.
 To disable this overlay on Linux, open ``nvidia-settings``, go to **X Screen 0 >
 To disable this overlay on Linux, open ``nvidia-settings``, go to **X Screen 0 >
 OpenGL Settings** then uncheck **Enable Graphics API Visual Indicator**.
 OpenGL Settings** then uncheck **Enable Graphics API Visual Indicator**.
 
 
-The project window doesn't appear centered when I run the project
------------------------------------------------------------------
-
-This is a `known bug <https://github.com/godotengine/godot/issues/13017>`__. To
-resolve this, open **Project > Project Settings**, make sure **Advanced
-Settings** is active, and enable **Display > Window
-> DPI > Allow hiDPI**. On top of that, make sure your project is configured to
-support :ref:`multiple resolutions <doc_multiple_resolutions>`.
+The editor or project appears overly sharp or blurry
+----------------------------------------------------
+
+.. figure:: img/troubleshooting_graphics_driver_sharpening.webp
+   :align: center
+   :alt: Correct appearance (left), oversharpened appearance due to graphics driver sharpening (right)
+
+   Correct appearance (left), oversharpened appearance due to graphics driver sharpening (right)
+
+If the editor or project appears overly sharp, this is likely due to image
+sharpening being forced on all Vulkan or OpenGL applications by your graphics
+driver. You can disable this behavior in the graphics driver's control panel:
+
+- **NVIDIA (Windows):** Open the start menu and choose **NVIDIA Control Panel**.
+  Open the **Manage 3D settings** tab on the left. In the list in the middle,
+  scroll to **Image Sharpening** and set it to **Sharpening Off**.
+- **AMD (Windows):** Open the start menu and choose **AMD Software**. Click the
+  settings "cog" icon in the top-right corner. Go to the **Graphics** tab then
+  disable **Radeon Image Sharpening**.
+
+If the editor or project appears overly blurry, this is likely due to
+:abbr:`FXAA (Fast Approximate AntiAliasing)` being forced on all Vulkan or
+OpenGL applications by your graphics driver.
+
+- **NVIDIA (Windows):** Open the start menu and choose **NVIDIA Control Panel**.
+  Open the **Manage 3D settings** tab on the left. In the list in the middle,
+  scroll to **Fast Approximate Antialiasing** and set it to **Application
+  Controlled**.
+- **NVIDIA (Linux):** Open the applications menu and choose **NVIDIA X Server
+  Settings**. Select to **Antialiasing Settings** on the left, then uncheck
+  **Enable FXAA**.
+- **AMD (Windows):** Open the start menu and choose **AMD Software**. Click the
+  settings "cog" icon in the top-right corner. Go to the **Graphics** tab,
+  scroll to the bottom and click **Advanced** to unfold its settings. Disable
+  **Morphological Anti-Aliasing**.
+
+Third-party vendor-independent utilities such as vkBasalt may also force
+sharpening or FXAA on all Vulkan applications. You may want to check their
+configuration as well.
+
+After changing options in the graphics driver or third-party utilities, restart
+Godot to make the changes effective.
+
+If you still wish to force sharpening or FXAA on other applications, it's
+recommended to do so on a per-application basis using the application profiles
+system provided by graphics drivers' control panels.
 
 
 The project works when run from the editor, but fails to load some files when running from an exported copy
 The project works when run from the editor, but fails to load some files when running from an exported copy
 -----------------------------------------------------------------------------------------------------------
 -----------------------------------------------------------------------------------------------------------

+ 2 - 1
community/tutorials.rst

@@ -44,11 +44,12 @@ Video tutorials
 - `Garbaj <https://www.youtube.com/c/Garbaj/>`_ (3D, GDScript).
 - `Garbaj <https://www.youtube.com/c/Garbaj/>`_ (3D, GDScript).
 - `Kasper Frandsen <https://www.youtube.com/c/KasperFrandsen/>`_ (3D, Shaders).
 - `Kasper Frandsen <https://www.youtube.com/c/KasperFrandsen/>`_ (3D, Shaders).
 - `bitbrain <https://www.youtube.com/watch?v=lFIBn8kJ-IM&list=PL4AhUX6lGjJWfiDORSmEu8x_myelbe1p2>`_ (2D, GDScript).
 - `bitbrain <https://www.youtube.com/watch?v=lFIBn8kJ-IM&list=PL4AhUX6lGjJWfiDORSmEu8x_myelbe1p2>`_ (2D, GDScript).
+- `Gwizz <https://www.youtube.com/@Gwizz1027>`_ (2D, GDScript).
 
 
 Text tutorials
 Text tutorials
 --------------
 --------------
 
 
-- `FinepointCGI website by Mitch <http://finepointcgi.io/>`__
+- `FinepointCGI website by Mitch <https://finepointcgi.io/>`__
 - `GDScript website by Andrew Wilkes <https://gdscript.com>`__
 - `GDScript website by Andrew Wilkes <https://gdscript.com>`__
 - `Godot Recipes by KidsCanCode <https://kidscancode.org/godot_recipes/4.x/>`__
 - `Godot Recipes by KidsCanCode <https://kidscancode.org/godot_recipes/4.x/>`__
 - `Steincodes <https://steincodes.tumblr.com>`__
 - `Steincodes <https://steincodes.tumblr.com>`__

+ 1 - 0
conf.py

@@ -17,6 +17,7 @@ extensions = [
     "sphinx_tabs.tabs",
     "sphinx_tabs.tabs",
     "notfound.extension",
     "notfound.extension",
     "sphinxext.opengraph",
     "sphinxext.opengraph",
+    "sphinx_copybutton",
 ]
 ]
 
 
 # Warning when the Sphinx Tabs extension is used with unknown
 # Warning when the Sphinx Tabs extension is used with unknown

+ 6 - 6
contributing/development/code_style_guidelines.rst

@@ -15,7 +15,7 @@ C++ and Objective-C
 -------------------
 -------------------
 
 
 There are no written guidelines, but the code style agreed upon by the
 There are no written guidelines, but the code style agreed upon by the
-developers is enforced via the `clang-format <http://clang.llvm.org/docs/ClangFormat.html>`__
+developers is enforced via the `clang-format <https://clang.llvm.org/docs/ClangFormat.html>`__
 code beautifier, which takes care for you of all our conventions.
 code beautifier, which takes care for you of all our conventions.
 To name a few:
 To name a few:
 
 
@@ -69,10 +69,10 @@ Here's how to install clang-format:
 - Linux: It will usually be available out-of-the-box with the clang toolchain
 - Linux: It will usually be available out-of-the-box with the clang toolchain
   packaged by your distribution. If your distro version is not the required one,
   packaged by your distribution. If your distro version is not the required one,
   you can download a pre-compiled version from the
   you can download a pre-compiled version from the
-  `LLVM website <http://releases.llvm.org/download.html>`__, or if you are on
-  a Debian derivative, use the `upstream repos <http://apt.llvm.org/>`__.
+  `LLVM website <https://releases.llvm.org/download.html>`__, or if you are on
+  a Debian derivative, use the `upstream repos <https://apt.llvm.org/>`__.
 - macOS and Windows: You can download precompiled binaries from the
 - macOS and Windows: You can download precompiled binaries from the
-  `LLVM website <http://releases.llvm.org/download.html>`__. You may need to add
+  `LLVM website <https://releases.llvm.org/download.html>`__. You may need to add
   the path to the binary's folder to your system's ``PATH`` environment
   the path to the binary's folder to your system's ``PATH`` environment
   variable to be able to call ``clang-format`` out of the box.
   variable to be able to call ``clang-format`` out of the box.
 
 
@@ -118,7 +118,7 @@ clang-format automatically, for example each time you save a file.
 
 
 Here is a non-exhaustive list of beautifier plugins for some IDEs:
 Here is a non-exhaustive list of beautifier plugins for some IDEs:
 
 
-- Qt Creator: `Beautifier plugin <http://doc.qt.io/qtcreator/creator-beautifier.html>`__
+- Qt Creator: `Beautifier plugin <https://doc.qt.io/qtcreator/creator-beautifier.html>`__
 - Visual Studio Code: `Clang-Format <https://marketplace.visualstudio.com/items?itemName=xaver.clang-format>`__
 - Visual Studio Code: `Clang-Format <https://marketplace.visualstudio.com/items?itemName=xaver.clang-format>`__
 - Visual Studio: `ClangFormat <https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.ClangFormat>`__
 - Visual Studio: `ClangFormat <https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.ClangFormat>`__
 - vim: `vim-clang-format <https://github.com/rhysd/vim-clang-format>`__
 - vim: `vim-clang-format <https://github.com/rhysd/vim-clang-format>`__
@@ -321,7 +321,7 @@ Godot's codebase.
   always end them with a period.
   always end them with a period.
 - Reference variable/function names and values using backticks.
 - Reference variable/function names and values using backticks.
 - Wrap comments to ~100 characters.
 - Wrap comments to ~100 characters.
-- You can use ``TODO:``, ``FIXME:``, ``NOTE:``, or ``HACK:`` as adominitions
+- You can use ``TODO:``, ``FIXME:``, ``NOTE:``, or ``HACK:`` as admonitions
   when needed.
   when needed.
 
 
 **Example:**
 **Example:**

+ 2 - 2
contributing/development/compiling/compiling_for_windows.rst

@@ -19,7 +19,7 @@ For compiling under Windows, the following is required:
   version 2017 or later. VS 2019 is recommended.
   version 2017 or later. VS 2019 is recommended.
   **Make sure to read "Installing Visual Studio caveats" below or you
   **Make sure to read "Installing Visual Studio caveats" below or you
   will have to run/download the installer again.**
   will have to run/download the installer again.**
-- `MinGW-w64 <http://mingw-w64.org/>`_ with GCC can be used as an alternative to
+- `MinGW-w64 <https://mingw-w64.org/>`_ with GCC can be used as an alternative to
   Visual Studio. Be sure to install/configure it to use the ``posix`` thread model.
   Visual Studio. Be sure to install/configure it to use the ``posix`` thread model.
   **Important:** When using MinGW to compile the ``master`` branch, you need GCC 9 or later.
   **Important:** When using MinGW to compile the ``master`` branch, you need GCC 9 or later.
 - `Python 3.6+ <https://www.python.org/downloads/windows/>`_.
 - `Python 3.6+ <https://www.python.org/downloads/windows/>`_.
@@ -31,7 +31,7 @@ For compiling under Windows, the following is required:
 .. note:: If you have `Scoop <https://scoop.sh/>`_ installed, you can easily
 .. note:: If you have `Scoop <https://scoop.sh/>`_ installed, you can easily
           install MinGW and other dependencies using the following command::
           install MinGW and other dependencies using the following command::
 
 
-              scoop install gcc python scons make
+              scoop install gcc python scons make mingw
 
 
 .. note:: If you have `MSYS2 <https://www.msys2.org/>`_ installed, you can easily
 .. note:: If you have `MSYS2 <https://www.msys2.org/>`_ installed, you can easily
           install MinGW and other dependencies using the following command::
           install MinGW and other dependencies using the following command::

+ 3 - 5
contributing/development/compiling/cross-compiling_for_ios_on_linux.rst

@@ -15,10 +15,8 @@ Disclaimer
 While it is possible to compile for iOS on a Linux environment, Apple is
 While it is possible to compile for iOS on a Linux environment, Apple is
 very restrictive about the tools to be used (especially hardware-wise),
 very restrictive about the tools to be used (especially hardware-wise),
 allowing pretty much only their products to be used for development. So
 allowing pretty much only their products to be used for development. So
-this is **not official**. However, a `statement from Apple in 2010
-<http://www.apple.com/pr/library/2010/09/09Statement-by-Apple-on-App-Store-Review-Guidelines.html>`__
-says they relaxed some of the `App Store review guidelines
-<https://developer.apple.com/app-store/review/guidelines/>`__
+this is **not official**. However, in 2010 Apple said they relaxed some of the
+`App Store review guidelines <https://developer.apple.com/app-store/review/guidelines/>`__
 to allow any tool to be used, as long as the resulting binary does not
 to allow any tool to be used, as long as the resulting binary does not
 download any code, which means it should be OK to use the procedure
 download any code, which means it should be OK to use the procedure
 described here and cross-compiling the binary.
 described here and cross-compiling the binary.
@@ -28,7 +26,7 @@ Requirements
 
 
 - `XCode with the iOS SDK <https://developer.apple.com/xcode/download>`__
 - `XCode with the iOS SDK <https://developer.apple.com/xcode/download>`__
   (a dmg image, for newer versions a **xip** file is going to be downloaded.)
   (a dmg image, for newer versions a **xip** file is going to be downloaded.)
-- `Clang >= 3.5 <http://clang.llvm.org>`__ for your development
+- `Clang >= 3.5 <https://clang.llvm.org>`__ for your development
   machine installed and in the ``PATH``. It has to be version >= 3.5
   machine installed and in the ``PATH``. It has to be version >= 3.5
   to target ``arm64`` architecture.
   to target ``arm64`` architecture.
 - `Fuse <https://github.com/libfuse/libfuse>`__ for mounting and unmounting
 - `Fuse <https://github.com/libfuse/libfuse>`__ for mounting and unmounting

+ 15 - 34
contributing/development/compiling/introduction_to_the_buildsystem.rst

@@ -5,45 +5,20 @@ Introduction to the buildsystem
 
 
 .. highlight:: shell
 .. highlight:: shell
 
 
-SCons
------
-
-Godot uses `SCons <https://www.scons.org/>`__ to build. We love it, we are not
-changing it for anything else. We constantly get requests to move the build
-system to CMake, or Visual Studio, but this is not going to happen. There are
-many reasons why we have chosen SCons over other alternatives, for example:
-
--  Godot can be compiled for a dozen different platforms: all PC
-   platforms, all mobile platforms, many consoles, and WebAssembly.
--  Developers often need to compile for several of the platforms **at
-   the same time**, or even different targets of the same platform. They
-   can't afford reconfiguring and rebuilding the project each time.
-   SCons can do this with no sweat, without breaking the builds.
--  SCons will *never* break a build no matter how many changes,
-   configurations, additions, removals etc.
--  Godot's build process is not simple. Several files are generated by
-   code (binders), others are parsed (shaders), and others need to offer
-   customization (plugins). This requires complex logic which is easier
-   to write in an actual programming language (like Python) rather than
-   using a mostly macro-based language only meant for building.
--  Godot build process makes heavy use of cross-compiling tools. Each
-   platform has a specific detection process, and all these must be
-   handled as specific cases with special code written for each.
-
-Please try to keep an open mind and get at least a little familiar with it if
-you are planning to build Godot yourself.
 
 
 Setup
 Setup
 -----
 -----
 
 
-Please refer to the documentation for :ref:`doc_compiling_for_android`,
-:ref:`doc_compiling_for_ios`,  :ref:`doc_compiling_for_linuxbsd`,
-:ref:`doc_compiling_for_macos`, :ref:`doc_compiling_for_uwp`,
-:ref:`doc_compiling_for_web`, and :ref:`doc_compiling_for_windows`.
+:ref:`Godot uses the SCons build system. <doc_faq_why_scons>`
+Please refer to the documentation for:
 
 
-Note that for **Windows/Visual Studio**, you need to use ``x86_x64 Cross Tools
-Command Prompt for VS 2017`` or similar, depending on your install, instead of
-the standard Windows command prompt to enter the commands below.
+- :ref:`doc_compiling_for_android`
+- :ref:`doc_compiling_for_ios`
+- :ref:`doc_compiling_for_linuxbsd`
+- :ref:`doc_compiling_for_macos`
+- :ref:`doc_compiling_for_uwp`
+- :ref:`doc_compiling_for_web`
+- :ref:`doc_compiling_for_windows`
 
 
 Platform selection
 Platform selection
 ------------------
 ------------------
@@ -189,6 +164,12 @@ does not define ``NDEBUG`` (so ``assert()`` works in thirdparty libraries).
 This flag appends the ``.dev`` suffix (for development) to the generated
 This flag appends the ``.dev`` suffix (for development) to the generated
 binary name.
 binary name.
 
 
+.. seealso::
+
+    There are additional SCons options to enable *sanitizers*, which are tools
+    you can enable at compile-time to better debug certain engine issues.
+    See :ref:`doc_using_sanitizers` for more information.
+
 Debugging symbols
 Debugging symbols
 -----------------
 -----------------
 
 

+ 1 - 1
contributing/development/core_and_modules/binding_to_external_libraries.rst

@@ -8,7 +8,7 @@ Modules
 
 
 The Summator example in :ref:`doc_custom_modules_in_cpp` is great for small,
 The Summator example in :ref:`doc_custom_modules_in_cpp` is great for small,
 custom modules, but what if you want to use a larger, external library?
 custom modules, but what if you want to use a larger, external library?
-Let's look at an example using `Festival <http://www.cstr.ed.ac.uk/projects/festival/>`_,
+Let's look at an example using `Festival <https://www.cstr.ed.ac.uk/projects/festival/>`_,
 a speech synthesis (text-to-speech) library written in C++.
 a speech synthesis (text-to-speech) library written in C++.
 
 
 To bind to an external library, set up a module directory similar to the Summator example:
 To bind to an external library, set up a module directory similar to the Summator example:

+ 4 - 4
contributing/development/core_and_modules/custom_platform_ports.rst

@@ -68,9 +68,9 @@ Required features of a platform port
 
 
 At the very least, a platform port must have methods from the :ref:`class_OS`
 At the very least, a platform port must have methods from the :ref:`class_OS`
 singleton implemented to be buildable and usable for headless operation.
 singleton implemented to be buildable and usable for headless operation.
-A ``logo.png`` (32×32) image must also be present within the platform folder.
-This logo is displayed in the Export dialog for each export preset targeting
-the platform in question.
+A ``logo.svg`` (32×32) vector image must also be present within the platform
+folder. This logo is displayed in the Export dialog for each export preset
+targeting the platform in question.
 
 
 See `this implementation <https://github.com/godotengine/godot/blob/master/platform/linuxbsd/os_linuxbsd.cpp>`__
 See `this implementation <https://github.com/godotengine/godot/blob/master/platform/linuxbsd/os_linuxbsd.cpp>`__
 for the Linux/\*BSD platform as an example. See also the
 for the Linux/\*BSD platform as an example. See also the
@@ -153,7 +153,7 @@ games.
   export template binary directly by renaming it to match the PCK file. See the
   export template binary directly by renaming it to match the PCK file. See the
   `EditorExportPlatform header <https://github.com/godotengine/godot/blob/master/editor/export/editor_export_platform.h>`__
   `EditorExportPlatform header <https://github.com/godotengine/godot/blob/master/editor/export/editor_export_platform.h>`__
   for reference.
   for reference.
-  ``run_icon.png`` (16×16) should be present within the platform folder if
+  ``run_icon.svg`` (16×16) should be present within the platform folder if
   :ref:`doc_one-click_deploy` is implemented for the target platform. This icon
   :ref:`doc_one-click_deploy` is implemented for the target platform. This icon
   is displayed at the top of the editor when one-click deploy is set up for the
   is displayed at the top of the editor when one-click deploy is set up for the
   target platform.
   target platform.

+ 2 - 2
contributing/development/core_and_modules/custom_resource_format_loaders.rst

@@ -302,8 +302,8 @@ calls into ``std::istream``.
 References
 References
 ~~~~~~~~~~
 ~~~~~~~~~~
 
 
-- `istream <http://www.cplusplus.com/reference/istream/istream/>`_
-- `streambuf <http://www.cplusplus.com/reference/streambuf/streambuf/?kw=streambuf>`_
+- `istream <https://cplusplus.com/reference/istream/istream/>`_
+- `streambuf <https://cplusplus.com/reference/streambuf/streambuf/?kw=streambuf>`_
 - `core/io/file_access.h <https://github.com/godotengine/godot/blob/master/core/os/file_access.h>`_
 - `core/io/file_access.h <https://github.com/godotengine/godot/blob/master/core/os/file_access.h>`_
 
 
 Registering the new file format
 Registering the new file format

+ 1 - 0
contributing/development/debugging/index.rst

@@ -9,6 +9,7 @@ engine code trying to find an underlying issue or an optimization possibility.
    :name: toc-devel-cpp-debug-profiling
    :name: toc-devel-cpp-debug-profiling
 
 
    using_cpp_profilers
    using_cpp_profilers
+   using_sanitizers
    macos_debug
    macos_debug
    vulkan/index
    vulkan/index
 
 

+ 176 - 0
contributing/development/debugging/using_sanitizers.rst

@@ -0,0 +1,176 @@
+.. _doc_using_sanitizers:
+
+Using sanitizers
+================
+
+What are sanitizers?
+--------------------
+
+Sanitizers are static instrumentation tools that help find bugs that traditional
+debuggers usually cannot catch. This is particularly useful when combined with
+:ref:`doc_unit_testing` in continuous integration.
+
+Sanitizers can be used on Windows, macOS and Linux by using the Clang (LLVM),
+GCC or Visual Studio compilers.
+:ref:`Certain platforms <doc_using_sanitizers_platform_specific_sanitizers>`
+may also have their own sanitizers available.
+In situations where a single sanitizer is provided by several different compilers,
+remember that their output and behavior will differ slightly.
+
+Using sanitizers on Godot
+-------------------------
+
+Sanitizers **require** recompiling the binary. This means you cannot use
+official Godot binaries to run sanitizers.
+
+When :ref:`compiling <toc-devel-compiling>` with any of the sanitizers enabled,
+the resulting binary will have the ``.san`` suffix added to its name to
+distinguish it from a binary without sanitizers.
+
+There is a performance impact as many additional runtime checks need to be
+performed. Memory utilization will also increase. It is possible to enable
+certain combinations of multiple sanitizers in a single build. Beware of the
+performance impact when using multiple sanitizers at once though, as the
+resulting binary may be excessively slow.
+
+Certain options can be passed to sanitizers without having to recompile the
+binary using environment variables.
+
+.. _doc_using_sanitizers_address_sanitizer:
+
+Address sanitizer (ASAN)
+------------------------
+
+- Available in Clang and GCC.
+- **Supported platforms:** Linux, macOS, Windows (Visual Studio), Web
+- `Clang ASAN documentation <https://clang.llvm.org/docs/AddressSanitizer.html>`__
+
+The address sanitizer is generally the most frequently used sanitizer. It can
+diagnose issues such as buffer overruns and out-of-bounds access. If the engine
+crashes with a message such as ``free(): invalid pointer``, this is typically
+the result of a buffer overrun. (This message is printed by the C runtime, not
+Godot.)
+
+In certain situations (such as detecting uninitialized memory reads),
+the address sanitizer doesn't suffice. The :ref:`doc_using_sanitizers_memory_sanitizer`
+should be used instead.
+
+It is also possible to detect use-after-return situations by specifying the
+``ASAN_OPTIONS=detect_stack_use_after_return=1`` environment variable before
+*running* Godot (not when compiling it). This increases the address sanitizer's
+runtime overhead, so only enable this feature when you actually need it.
+
+To enable the address sanitizer in a Godot build, pass the ``use_asan=yes``
+SCons option when compiling. Enabling ASAN generally makes the resulting binary
+about 2× slower.
+
+.. warning::
+
+    Due to a `design decision
+    <https://stackoverflow.com/questions/36971902/why-cant-clang-enable-all-sanitizers/>`__,
+    the address, memory and thread sanitizers are mutually exclusive. This means
+    you can only use one of those sanitizers in a given binary.
+
+Leak sanitizer (LSAN)
+---------------------
+
+- Available in Clang and GCC.
+- **Supported platforms:** Linux, Web
+- `Clang LSAN documentation <https://clang.llvm.org/docs/LeakSanitizer.html>`__
+
+The leak sanitizer can detect memory leaks, which are situations where memory
+that is no longer in use is never freed by the running program. This can
+potentially lead to out-of-memory situations if the program runs for long
+enough. Since Godot may run on
+:ref:`dedicated servers <doc_exporting_for_dedicated_servers>` for months or
+even years without a restart, it's important to fix memory leaks when they occur.
+
+To enable the leak sanitizer in a Godot build, pass the ``use_lsan=yes`` SCons
+option when compiling. Enabling LSAN only has a small performance overhead, but
+the program will be much slower to exit as leak detection occurs when the
+program exits.
+
+.. _doc_using_sanitizers_memory_sanitizer:
+
+Memory sanitizer (MSAN)
+-----------------------
+
+- Available in Clang only, not GCC.
+- **Supported platforms:** Linux
+- `Clang MSAN documentation <https://clang.llvm.org/docs/MemorySanitizer.html>`__
+
+The memory sanitizer complements the
+:ref:`doc_using_sanitizers_address_sanitizer`. Unlike the address sanitizer,
+the memory sanitizer can detect uninitialized memory reads.
+
+To enable the memory sanitizer in a Godot build, pass the ``use_msan=yes``
+SCons option when compiling. Enabling MSAN generally makes the resulting binary
+about 3× slower.
+
+.. warning::
+
+    Due to a `design decision
+    <https://stackoverflow.com/questions/36971902/why-cant-clang-enable-all-sanitizers/>`__,
+    the address, memory and thread sanitizers are mutually exclusive. This means
+    you can only use one of those sanitizers in a given binary.
+
+Thread sanitizer (TSAN)
+-----------------------
+
+- Available in Clang and GCC.
+- **Supported platforms:** Linux, macOS
+- `Clang TSAN documentation <https://clang.llvm.org/docs/ThreadSanitizer.html>`__
+
+The thread sanitizer is used to track down race conditions related to
+multithreading. A race condition is when multiple threads try to modify the same
+data at the same time. Since thread scheduling can be ordered in any fashion by
+the operating system, this leads to incorrect behavior that only occurs
+occasionally (and can be difficult to track as a result). To prevent a race
+condition, you need to add a lock to ensure only one thread can access the
+shared data at a given time.
+
+To enable the thread sanitizer in a Godot build, pass the ``use_tsan=yes`` SCons
+option when compiling. Enabling TSAN generally makes the resulting binary 10×
+slower, while also multiplying memory usage by an approximately 8× factor.
+
+.. warning::
+
+    Due to a `design decision
+    <https://stackoverflow.com/questions/36971902/why-cant-clang-enable-all-sanitizers/>`__,
+    the address, memory and thread sanitizers are mutually exclusive. This means
+    you can only use one of those sanitizers in a given binary.
+
+Undefined behavior sanitizer (UBSAN)
+------------------------------------
+
+- Available in Clang and GCC.
+- **Supported platforms:** Linux, macOS, Web
+- `Clang UBSAN documentation <https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html>`__
+
+The undefined behavior sanitizer is used to track down situations where the
+program exhibits random and unpredictable behavior. This is due to C/C++ code
+that is accepted by the compiler, but is not *correct*. Compiling with a
+different set of optimizations can also change the observed results of undefined
+behavior.
+
+To enable the undefined behavior sanitizer in a Godot build, pass the
+``use_ubsan=yes`` SCons option when compiling. Enabling UBSAN only has a small
+performance overhead.
+
+.. _doc_using_sanitizers_platform_specific_sanitizers:
+
+Platform-specific sanitizers
+----------------------------
+
+Web
+^^^
+
+When :ref:`compiling for the Web <doc_compiling_for_web>`,
+there are 2 additional sanitizer SCons options available:
+
+- ``use_assertions=yes`` enables runtime Emscripten assertions, which can catch
+  various issues.
+- ``use_safe_heap=yes`` enables `Emscripten's SAFE_HEAP sanitizer <https://emscripten.org/docs/debugging/Sanitizers.html>`__.
+  It provides similar functionality to ASAN, but it focuses on issues that
+  are specific to WebAssembly. ``SAFE_HEAP`` is not guaranteed to be compatible
+  with ASAN and UBSAN in the same binary, so you may have to build it separately.

+ 1 - 1
contributing/development/editor/creating_icons.rst

@@ -38,7 +38,7 @@ Color conversion for light editor themes
 
 
 If the user has configured their editor to use a light theme, Godot will
 If the user has configured their editor to use a light theme, Godot will
 convert the icon's colors based on a
 convert the icon's colors based on a
-`set of predefined color mappings <https://github.com/godotengine/godot/blob/b9f2e57d6240346f1833fd0390de195c956299e7/editor/editor_themes.cpp#L122-L184>`__.
+`set of predefined color mappings <https://github.com/godotengine/godot/blob/4.0.2-stable/editor/editor_themes.cpp#L60-L160>`__.
 This is to ensure the icon always displays with a sufficient contrast rate.
 This is to ensure the icon always displays with a sufficient contrast rate.
 Try to restrict your icon's color palette to colors found in the list above.
 Try to restrict your icon's color palette to colors found in the list above.
 Otherwise, your icon may become difficult to read on a light background.
 Otherwise, your icon may become difficult to read on a light background.

+ 1 - 1
contributing/development/editor/introduction_to_editor_development.rst

@@ -77,7 +77,7 @@ from ``servers/`` and ``core/``, it cannot depend on includes from ``editor/``.
 
 
 Currently, there are some dependencies to ``editor/`` includes in ``scene/``
 Currently, there are some dependencies to ``editor/`` includes in ``scene/``
 files, but
 files, but
-`they are in the process of being removed <https://github.com/godotengine/godot/issues/29730>`__.
+`they are in the process of being removed <https://github.com/godotengine/godot/issues/53295>`__.
 
 
 Development tips
 Development tips
 ----------------
 ----------------

+ 86 - 34
contributing/documentation/building_the_manual.rst

@@ -24,18 +24,51 @@ Before you get started, make sure that you have:
 
 
     a.  Create the virtual environment:
     a.  Create the virtual environment:
 
 
-        - On Windows, run ``py -m venv godot-docs-venv``
-        - On other platforms, run ``python3 -m venv godot-docs-venv``
+        .. tabs::
+
+            .. group-tab:: Windows
+
+                .. code:: pwsh
+
+                    py -m venv godot-docs-venv
+
+            .. group-tab:: Other platforms
+
+                .. code:: sh
+
+                    python3 -m venv godot-docs-venv
 
 
     b.  Activate the virtual environment:
     b.  Activate the virtual environment:
 
 
-        - On Windows, run ``godot-docs-venv\Scripts\activate.bat``
-        - On other platforms, run ``source godot-docs-venv/bin/activate``
+        .. tabs::
+
+            .. group-tab:: Windows
+
+                .. code:: pwsh
+
+                    godot-docs-venv\Scripts\activate.bat
+
+            .. group-tab:: Other platforms
+
+                .. code:: sh
+
+                    source godot-docs-venv/bin/activate
 
 
     c.  *(Optional)* Update pre-installed packages:
     c.  *(Optional)* Update pre-installed packages:
 
 
-        - On Windows, run ``py -m pip install --upgrade pip setuptools``
-        - On other platforms, run ``pip3 install --upgrade pip setuptools``
+        .. tabs::
+
+            .. group-tab:: Windows
+
+                .. code:: pwsh
+
+                    py -m pip install --upgrade pip setuptools
+
+            .. group-tab:: Other platforms
+
+                .. code:: sh
+
+                    pip3 install --upgrade pip setuptools
 
 
 2.  Clone the docs repo:
 2.  Clone the docs repo:
 
 
@@ -61,8 +94,23 @@ Before you get started, make sure that you have:
 
 
         make html
         make html
 
 
-.. note:: On Windows, that command will run ``make.bat`` instead of GNU Make (or
-          an alternative).
+    .. note::
+        On Windows, that command will run ``make.bat`` instead of GNU Make (or an alternative).
+
+    Alternatively, you can build the documentation by running the sphinx-build program manually:
+
+    .. code:: sh
+
+        sphinx-build -b html ./ _build/html
+
+The compilation will take some time as the ``classes/`` folder contains hundreds of files.
+See :ref:`doc_building_the_manual:performance`.
+
+You can then browse the documentation by opening ``_build/html/index.html`` in
+your web browser.
+
+Dealing with errors
+-------------------
 
 
 If you run into errors, you may try the following command:
 If you run into errors, you may try the following command:
 
 
@@ -70,43 +118,47 @@ If you run into errors, you may try the following command:
 
 
     make SPHINXBUILD=~/.local/bin/sphinx-build html
     make SPHINXBUILD=~/.local/bin/sphinx-build html
 
 
-Building the documentation requires at least 8 GB of RAM to run without disk
-swapping, which slows it down. If you have at least 16 GB of RAM, you can speed
-up compilation by running:
+If you get a ``MemoryError`` or ``EOFError``, you can remove the ``classes/`` folder and
+run ``make`` again.
+This will drop the class references from the final HTML documentation but will keep the
+rest intact.
 
 
-.. code:: sh
+.. important::
+    If you delete the ``classes/`` folder, do not use ``git add .`` when working on a pull
+    request or the whole ``classes/`` folder will be removed when you commit.
+    See `#3157 <https://github.com/godotengine/godot-docs/issues/3157>`__ for more detail.
 
 
-    # On Linux/macOS
-    make html SPHINXOPTS=-j2
+.. _doc_building_the_manual:performance:
 
 
-    # On Windows
-    set SPHINXOPTS=-j2 && make html
+Hints for performance
+---------------------
 
 
-The compilation will take some time as the ``classes/`` folder contains hundreds
-of files.
+RAM usage
+^^^^^^^^^
 
 
-You can then browse the documentation by opening ``_build/html/index.html`` in
-your web browser.
+Building the documentation requires at least 8 GB of RAM to run without disk swapping,
+which slows it down.
+If you have at least 16 GB of RAM, you can speed up compilation by running:
 
 
-If you get a ``MemoryError`` or ``EOFError``, you can remove the
-``classes/`` folder and run ``make`` again. This will drop the class references
-from the final HTML documentation but will keep the rest intact.
+.. tabs::
 
 
-.. note:: If you delete the ``classes/`` folder, do not use ``git add .`` when
-          working on a pull request or the whole ``classes/`` folder will be
-          removed when you commit. See `#3157
-          <https://github.com/godotengine/godot-docs/issues/3157>`__ for more
-          detail.
+    .. group-tab:: Windows
 
 
-Alternatively, you can build the documentation by running the sphinx-build
-program manually:
+        .. code:: pwsh
 
 
-.. code:: sh
+            set SPHINXOPTS=-j2 && make html
+
+    .. group-tab:: Other platforms
+
+        .. code:: sh
+
+            make html SPHINXOPTS=-j2
 
 
-   sphinx-build -b html ./ _build/html
+Specifying a list of files
+^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 
-You can also specify a list of files to build, which can greatly speed up compilation:
+You can specify a list of files to build, which can greatly speed up compilation:
 
 
 .. code:: sh
 .. code:: sh
 
 
-  sphinx-build -b html ./ _build/html classes/class_node.rst classes/class_resource.rst
+    make FILELIST='classes/class_node.rst classes/class_resource.rst' html

+ 1 - 1
contributing/documentation/contributing_to_the_documentation.rst

@@ -146,7 +146,7 @@ Sphinx and reStructuredText syntax
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
 Check Sphinx’s `reST Primer <https://www.sphinx-doc.org/en/stable/rest.html>`__
 Check Sphinx’s `reST Primer <https://www.sphinx-doc.org/en/stable/rest.html>`__
-and the `official reference <http://docutils.sourceforge.net/rst.html>`__ for
+and the `official reference <https://docutils.sourceforge.net/rst.html>`__ for
 details on the syntax.
 details on the syntax.
 
 
 Sphinx uses specific reST comments to do specific operations, like defining the
 Sphinx uses specific reST comments to do specific operations, like defining the

+ 1 - 1
contributing/workflow/testing_pull_requests.rst

@@ -69,7 +69,7 @@ to generate a universal download link.
 - Open the `nightly.link <https://nightly.link>`__ website and paste the URL you just copied
 - Open the `nightly.link <https://nightly.link>`__ website and paste the URL you just copied
   into the text field located below the heading **Paste a GitHub link, get a nightly.link!**.
   into the text field located below the heading **Paste a GitHub link, get a nightly.link!**.
   After pasting the URL, click **Get links** on the right.
   After pasting the URL, click **Get links** on the right.
-  If the the format of the URL you pasted is correct, you should be presented
+  If the format of the URL you pasted is correct, you should be presented
   with a page like this:
   with a page like this:
 
 
 .. image:: img/testing_pull_requests_nightly_link.png
 .. image:: img/testing_pull_requests_nightly_link.png

+ 1 - 1
getting_started/first_2d_game/02.player_scene.rst

@@ -58,7 +58,7 @@ Click on the ``Player`` node and add (:kbd:`Ctrl + A`) a child node :ref:`Animat
 appearance and animations for our player. Notice that there is a warning symbol
 appearance and animations for our player. Notice that there is a warning symbol
 next to the node. An ``AnimatedSprite2D`` requires a :ref:`SpriteFrames
 next to the node. An ``AnimatedSprite2D`` requires a :ref:`SpriteFrames
 <class_SpriteFrames>` resource, which is a list of the animations it can
 <class_SpriteFrames>` resource, which is a list of the animations it can
-display. To create one, find the ``Sprite Frames`` property in the Inspector and click
+display. To create one, find the ``Sprite Frames`` property under the ``Animation`` tab in the Inspector and click
 "[empty]" -> "New SpriteFrames". Click again to open the "SpriteFrames" panel:
 "[empty]" -> "New SpriteFrames". Click again to open the "SpriteFrames" panel:
 
 
 .. image:: img/spriteframes_panel.webp
 .. image:: img/spriteframes_panel.webp

+ 1 - 1
getting_started/first_2d_game/03.coding_the_player.rst

@@ -475,7 +475,7 @@ Inspector tab to see the list of signals the player can emit:
 .. image:: img/player_signals.webp
 .. image:: img/player_signals.webp
 
 
 Notice our custom "hit" signal is there as well! Since our enemies are going to
 Notice our custom "hit" signal is there as well! Since our enemies are going to
-be ``RigidBody2D`` nodes, we want the ``body_entered(body: Node)`` signal. This
+be ``RigidBody2D`` nodes, we want the ``body_entered(body: Node2D)`` signal. This
 signal will be emitted when a body contacts the player. Click "Connect.." and
 signal will be emitted when a body contacts the player. Click "Connect.." and
 the "Connect a Signal" window appears. We don't need to change any of these
 the "Connect a Signal" window appears. We don't need to change any of these
 settings so click "Connect" again. Godot will automatically create a function in
 settings so click "Connect" again. Godot will automatically create a function in

+ 0 - 1
getting_started/first_3d_game/06.jump_and_squash.rst

@@ -237,7 +237,6 @@ With this code, if no collisions occurred on a given frame, the loop won't run.
         #...
         #...
 
 
         # Iterate through all collisions that occurred this frame
         # Iterate through all collisions that occurred this frame
-        # in C this would be for(int i = 0; i < collisions.Count; i++)
         for index in range(get_slide_collision_count()):
         for index in range(get_slide_collision_count()):
             # We get one of the collisions with the player
             # We get one of the collisions with the player
             var collision = get_slide_collision(index)
             var collision = get_slide_collision(index)

+ 2 - 2
getting_started/first_3d_game/07.killing_player.rst

@@ -208,7 +208,7 @@ Starting with ``Main.gd``.
 
 
             // Choose a random location on the SpawnPath.
             // Choose a random location on the SpawnPath.
             // We store the reference to the SpawnLocation node.
             // We store the reference to the SpawnLocation node.
-            var mobSpawnLocation = GetNode<PathFollow>("SpawnPath/SpawnLocation");
+            var mobSpawnLocation = GetNode<PathFollow3D>("SpawnPath/SpawnLocation");
             // And give it a random offset.
             // And give it a random offset.
             mobSpawnLocation.ProgressRatio = GD.Randf();
             mobSpawnLocation.ProgressRatio = GD.Randf();
 
 
@@ -480,7 +480,7 @@ Finally, the longest script, ``Player.gd``:
             }
             }
 
 
             // Iterate through all collisions that occurred this frame.
             // Iterate through all collisions that occurred this frame.
-            for (int index = 0; index < GetSlideCount(); index++)
+            for (int index = 0; index < GetSlideCollisionCount(); index++)
             {
             {
                 // We get one of the collisions with the player.
                 // We get one of the collisions with the player.
                 KinematicCollision3D collision = GetSlideCollision(index);
                 KinematicCollision3D collision = GetSlideCollision(index);

二進制
getting_started/step_by_step/img/signals_13_signals_connection_icon.png


二進制
getting_started/step_by_step/img/signals_13_signals_connection_icon.webp


二進制
getting_started/step_by_step/img/signals_14_signals_connection_info.png


二進制
getting_started/step_by_step/img/signals_14_signals_connection_info.webp


+ 2 - 2
getting_started/step_by_step/instancing.rst

@@ -45,7 +45,7 @@ you to download the ball's sample project we prepared for you:
 :download:`instancing.zip <files/instancing.zip>`.
 :download:`instancing.zip <files/instancing.zip>`.
 
 
 Extract the archive on your computer. To import it, you need the Project Manager.
 Extract the archive on your computer. To import it, you need the Project Manager.
-The Project Manager is accessed by opening Godot, or if you already have Godot opened, click on *Project -> Quit to Project List* (:kbd:`Ctrl + Shift + Q`)
+The Project Manager is accessed by opening Godot, or if you already have Godot opened, click on *Project -> Quit to Project List* (:kbd:`Ctrl + Shift + Q`, :kbd:`Ctrl + Option + Cmd + B` on macOS)
 
 
 In the Project Manager, click the *Import* button to import the project.
 In the Project Manager, click the *Import* button to import the project.
 
 
@@ -88,7 +88,7 @@ Click on it and drag it towards the center of the view.
 
 
 .. image:: img/instancing_ball_moved.png
 .. image:: img/instancing_ball_moved.png
 
 
-Play the game by pressing F5. You should see it fall.
+Play the game by pressing :kbd:`F5` (:kbd:`Cmd + B` on macOS). You should see it fall.
 
 
 Now, we want to create more instances of the Ball node. With the ball still
 Now, we want to create more instances of the Ball node. With the ball still
 selected, press :kbd:`Ctrl-D` (:kbd:`Cmd-D` on macOS) to call the duplicate
 selected, press :kbd:`Ctrl-D` (:kbd:`Cmd-D` on macOS) to call the duplicate

+ 1 - 1
getting_started/step_by_step/nodes_and_scenes.rst

@@ -157,7 +157,7 @@ The application should open in a new window and display the text "Hello World".
 
 
 .. image:: img/nodes_and_scenes_11_final_result.webp
 .. image:: img/nodes_and_scenes_11_final_result.webp
 
 
-Close the window or press :kbd:`F8` to quit the running scene.
+Close the window or press :kbd:`F8` (:kbd:`Cmd + .` on macOS) to quit the running scene.
 
 
 .. note::
 .. note::
 
 

+ 13 - 11
getting_started/step_by_step/signals.rst

@@ -1,5 +1,3 @@
-:article_outdated: True
-
 .. Intention: give the user a first taste of signals. We should write more
 .. Intention: give the user a first taste of signals. We should write more
    documentation in the scripting/ section.
    documentation in the scripting/ section.
 .. Note: GDScript snippets use one line return instead of two because they're
 .. Note: GDScript snippets use one line return instead of two because they're
@@ -114,7 +112,7 @@ Double-click the "pressed" signal to open the node connection window.
 There, you can connect the signal to the Sprite2D node. The node needs a
 There, you can connect the signal to the Sprite2D node. The node needs a
 receiver method, a function that Godot will call when the Button emits the
 receiver method, a function that Godot will call when the Button emits the
 signal. The editor generates one for you. By convention, we name these callback
 signal. The editor generates one for you. By convention, we name these callback
-methods "_on_NodeName_signal_name". Here, it'll be "_on_Button_pressed".
+methods "_on_node_name_signal_name". Here, it'll be "_on_button_pressed".
 
 
 .. note::
 .. note::
 
 
@@ -133,12 +131,12 @@ Click the Connect button to complete the signal connection and jump to the
 Script workspace. You should see the new method with a connection icon in the
 Script workspace. You should see the new method with a connection icon in the
 left margin.
 left margin.
 
 
-.. image:: img/signals_13_signals_connection_icon.png
+.. image:: img/signals_13_signals_connection_icon.webp
 
 
 If you click the icon, a window pops up and displays information about the
 If you click the icon, a window pops up and displays information about the
 connection. This feature is only available when connecting nodes in the editor.
 connection. This feature is only available when connecting nodes in the editor.
 
 
-.. image:: img/signals_14_signals_connection_info.png
+.. image:: img/signals_14_signals_connection_info.webp
 
 
 Let's replace the line with the ``pass`` keyword with code that'll toggle the
 Let's replace the line with the ``pass`` keyword with code that'll toggle the
 node's motion.
 node's motion.
@@ -152,7 +150,7 @@ the ``not`` keyword to invert the value.
 .. tabs::
 .. tabs::
  .. code-tab:: gdscript GDScript
  .. code-tab:: gdscript GDScript
 
 
-    func _on_Button_pressed():
+    func _on_button_pressed():
         set_process(not is_processing())
         set_process(not is_processing())
 
 
  .. code-tab:: csharp C#
  .. code-tab:: csharp C#
@@ -203,7 +201,7 @@ Your complete ``Sprite2D.gd`` code should look like the following.
         position += velocity * delta
         position += velocity * delta
 
 
 
 
-    func _on_Button_pressed():
+    func _on_button_pressed():
         set_process(not is_processing())
         set_process(not is_processing())
 
 
  .. code-tab:: csharp C#
  .. code-tab:: csharp C#
@@ -300,7 +298,7 @@ We can now connect the Timer to the Sprite2D in the ``_ready()`` function.
 
 
     func _ready():
     func _ready():
         var timer = get_node("Timer")
         var timer = get_node("Timer")
-        timer.timeout.connect(_on_Timer_timeout)
+        timer.timeout.connect(_on_timer_timeout)
 
 
  .. code-tab:: csharp C#
  .. code-tab:: csharp C#
 
 
@@ -312,13 +310,17 @@ We can now connect the Timer to the Sprite2D in the ``_ready()`` function.
 
 
 The line reads like so: we connect the Timer's "timeout" signal to the node to
 The line reads like so: we connect the Timer's "timeout" signal to the node to
 which the script is attached. When the Timer emits ``timeout``, we want to call
 which the script is attached. When the Timer emits ``timeout``, we want to call
-the function ``_on_Timer_timeout()``, that we need to define. Let's add it at the
+the function ``_on_timer_timeout()``, that we need to define. Let's add it at the
 bottom of our script and use it to toggle our sprite's visibility.
 bottom of our script and use it to toggle our sprite's visibility.
 
 
+.. note:: By convention, we name these callback methods in GDScript as 
+          "_on_node_name_signal_name" and in C# as "OnNodeNameSignalName".
+          Here, it'll be "_on_timer_timeout" for GDScript and OnTimerTimeout() for C#.
+
 .. tabs::
 .. tabs::
  .. code-tab:: gdscript GDScript
  .. code-tab:: gdscript GDScript
 
 
-    func _on_Timer_timeout():
+    func _on_timer_timeout():
         visible = not visible
         visible = not visible
 
 
  .. code-tab:: csharp C#
  .. code-tab:: csharp C#
@@ -361,7 +363,7 @@ Here is the complete ``Sprite2D.gd`` file for reference.
         position += velocity * delta
         position += velocity * delta
 
 
 
 
-    func _on_Button_pressed():
+    func _on_button_pressed():
         set_process(not is_processing())
         set_process(not is_processing())
 
 
 
 

+ 1 - 1
make.bat

@@ -22,7 +22,7 @@ if errorlevel 9009 (
     echo.may add the Sphinx directory to PATH.
     echo.may add the Sphinx directory to PATH.
     echo.
     echo.
     echo.If you don't have Sphinx installed, grab it from
     echo.If you don't have Sphinx installed, grab it from
-    echo.http://sphinx-doc.org/
+    echo.https://www.sphinx-doc.org/
     exit /b 1
     exit /b 1
 )
 )
 
 

+ 2 - 0
requirements.txt

@@ -13,6 +13,8 @@ sphinx_rtd_theme==1.1.1
 
 
 # Code tabs extension to display codeblocks in different languages as tabs.
 # Code tabs extension to display codeblocks in different languages as tabs.
 sphinx-tabs==3.4.0
 sphinx-tabs==3.4.0
+# Adds a 'copy' button to the right of codeblocks.
+sphinx-copybutton==0.5.1
 # Custom 404 error page (more useful than the default).
 # Custom 404 error page (more useful than the default).
 sphinx-notfound-page==0.8.3
 sphinx-notfound-page==0.8.3
 # Adds Open Graph tags in the HTML `<head>` tag.
 # Adds Open Graph tags in the HTML `<head>` tag.

+ 1 - 1
tutorials/2d/2d_lights_and_shadows.rst

@@ -36,7 +36,7 @@ There are several nodes involved in a complete 2D lighting setup:
 
 
 - :ref:`CanvasModulate <class_CanvasModulate>` (to darken the rest of the scene)
 - :ref:`CanvasModulate <class_CanvasModulate>` (to darken the rest of the scene)
 - :ref:`PointLight2D <class_PointLight2D>` (for omnidirectional or spot lights)
 - :ref:`PointLight2D <class_PointLight2D>` (for omnidirectional or spot lights)
-- :ref:`DirectionalLight2D <class_PointLight2D>` (for sunlight or moonlight)
+- :ref:`DirectionalLight2D <class_DirectionalLight2D>` (for sunlight or moonlight)
 - :ref:`LightOccluder2D <class_LightOccluder2D>` (for light shadow casters)
 - :ref:`LightOccluder2D <class_LightOccluder2D>` (for light shadow casters)
 - Other 2D nodes that receive lighting, such as Sprite2D or TileMap.
 - Other 2D nodes that receive lighting, such as Sprite2D or TileMap.
 
 

+ 1 - 1
tutorials/2d/canvas_layers.rst

@@ -13,7 +13,7 @@ You can arrange canvas items in trees. Each item will inherit its parent's
 transform: when the parent moves, its children move too.
 transform: when the parent moves, its children move too.
 
 
 CanvasItem nodes, and nodes inheriting from them, are direct or indirect children of a
 CanvasItem nodes, and nodes inheriting from them, are direct or indirect children of a
-:ref:`Viewport <class_Viewport>`, that display them.
+:ref:`Viewport <class_Viewport>`, that displays them.
 
 
 The Viewport's property
 The Viewport's property
 :ref:`Viewport.canvas_transform <class_Viewport_property_canvas_transform>`,
 :ref:`Viewport.canvas_transform <class_Viewport_property_canvas_transform>`,

+ 19 - 1
tutorials/3d/3d_rendering_limitations.rst

@@ -56,9 +56,15 @@ There are two main ways to alleviate banding:
   rendered with low color precision, which means it will work when using the
   rendered with low color precision, which means it will work when using the
   Mobile and Compatibility rendering methods.
   Mobile and Compatibility rendering methods.
 
 
+.. figure:: img/3d_rendering_limitations_banding.webp
+   :align: center
+   :alt: Color banding comparison (contrast increased for more visibility)
+
+   Color banding comparison (contrast increased for more visibility)
+
 .. seealso::
 .. seealso::
 
 
-    See `Banding in Games: A Noisy Rant <http://loopit.dk/banding_in_games.pdf>`__
+    See `Banding in Games: A Noisy Rant (PDF) <https://loopit.dk/banding_in_games.pdf>`__
     for more details about banding and ways to combat it.
     for more details about banding and ways to combat it.
 
 
 Depth buffer precision
 Depth buffer precision
@@ -88,6 +94,12 @@ Depending on the scene and viewing conditions, you may also be able to move the
 Z-fighting objects further apart without the difference being visible to the
 Z-fighting objects further apart without the difference being visible to the
 player.
 player.
 
 
+.. figure:: img/3d_rendering_limitations_z_fighting.webp
+   :align: center
+   :alt: Z-fighting comparison (before and after tweaking the scene by offsetting the Label3D away from the floor)
+
+   Z-fighting comparison (before and after tweaking the scene by offsetting the Label3D away from the floor)
+
 .. _doc_3d_rendering_limitations_transparency_sorting:
 .. _doc_3d_rendering_limitations_transparency_sorting:
 
 
 Transparency sorting
 Transparency sorting
@@ -133,6 +145,12 @@ this feature. There are still several ways to avoid this problem:
   distance fade mode **Pixel Dither** or **Object Dither** instead of
   distance fade mode **Pixel Dither** or **Object Dither** instead of
   **PixelAlpha**. This will make the material opaque, which also speeds up rendering.
   **PixelAlpha**. This will make the material opaque, which also speeds up rendering.
 
 
+.. figure:: img/3d_rendering_limitations_transparency_sorting.webp
+   :align: center
+   :alt: Transparency sorting comparison (alpha-blended materials on the left, alpha scissor materials on the right)
+
+   Transparency sorting comparison (alpha-blended materials on the left, alpha scissor materials on the right)
+
 Multi-sample antialiasing
 Multi-sample antialiasing
 -------------------------
 -------------------------
 
 

+ 24 - 20
tutorials/3d/environment_and_post_processing.rst

@@ -349,11 +349,13 @@ The tone mapping options are:
 Mid- and post-processing effects
 Mid- and post-processing effects
 --------------------------------
 --------------------------------
 
 
-The Environment resource supports many widely-used mid- and post-processing effects.
+The Environment resource supports many popular mid- and post-processing effects.
 
 
 .. note::
 .. note::
 
 
-    Screen-space effects such as SSR, SSAO, SSIL and glow do not operate on
+    Screen-space effects such as :abbr:`SSR (Screen-Space Reflections)`,
+    :abbr:`SSAO (Screen-Space Ambient Occlusion)`,
+    :abbr:`SSIL (Screen-Space Indirect Lighting)` and glow do not operate on
     geometry that is located outside the camera view or is occluded by other
     geometry that is located outside the camera view or is occluded by other
     opaque geometry. Consider this when tweaking their settings to avoid
     opaque geometry. Consider this when tweaking their settings to avoid
     distracting changes during gameplay.
     distracting changes during gameplay.
@@ -397,7 +399,8 @@ A few user-controlled parameters are available to better tweak the technique:
 
 
 Keep in mind that screen-space-reflections only work for reflecting opaque
 Keep in mind that screen-space-reflections only work for reflecting opaque
 geometry. Transparent materials won't be reflected, as they don't write to the depth buffer.
 geometry. Transparent materials won't be reflected, as they don't write to the depth buffer.
-This also applies to shaders that use ``SCREEN_TEXTURE`` or ``DEPTH_TEXTURE``.
+This also applies to shaders that use ``hint_screen_texture`` or ``hint_depth_texture``
+uniforms.
 
 
 Screen-Space Ambient Occlusion (SSAO)
 Screen-Space Ambient Occlusion (SSAO)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -423,21 +426,21 @@ a narrower path for the light to enter:
 .. image:: img/environment_ssao.webp
 .. image:: img/environment_ssao.webp
 
 
 It is a common mistake to enable this effect, turn on a light, and not be able to
 It is a common mistake to enable this effect, turn on a light, and not be able to
-appreciate it. This is because :abbr:`Screen-Space Ambient Occlusion (SSAO)`
+appreciate it. This is because :abbr:`SSAO (Screen-Space Ambient Occlusion)`
 only acts on *ambient* light. It does not affect direct light.
 only acts on *ambient* light. It does not affect direct light.
 
 
 This is why, in the image above, the effect is less noticeable under the direct
 This is why, in the image above, the effect is less noticeable under the direct
 light (on the left). If you want to force
 light (on the left). If you want to force
-:abbr:`Screen-Space Ambient Occlusion (SSAO)` to work with direct light too,
+:abbr:`SSAO (Screen-Space Ambient Occlusion)` to work with direct light too,
 use the **Light Affect** parameter. Even though this is not physically correct,
 use the **Light Affect** parameter. Even though this is not physically correct,
 some artists like how it looks.
 some artists like how it looks.
 
 
-:abbr:`Screen-Space Ambient Occlusion (SSAO)` looks best when combined with a
+:abbr:`SSAO (Screen-Space Ambient Occlusion)` looks best when combined with a
 real source of indirect light, like VoxelGI:
 real source of indirect light, like VoxelGI:
 
 
 .. image:: img/environment_ssao2.webp
 .. image:: img/environment_ssao2.webp
 
 
-Tweaking :abbr:`Screen-Space Ambient Occlusion (SSAO)` is possible with several
+Tweaking :abbr:`SSAO (Screen-Space Ambient Occlusion)` is possible with several
 parameters:
 parameters:
 
 
 .. image:: img/environment_ssao_parameters.webp
 .. image:: img/environment_ssao_parameters.webp
@@ -448,9 +451,9 @@ parameters:
 - **Intensity:** The primary screen-space ambient occlusion intensity. Acts as a
 - **Intensity:** The primary screen-space ambient occlusion intensity. Acts as a
   multiplier for the screen-space ambient occlusion effect. A higher value
   multiplier for the screen-space ambient occlusion effect. A higher value
   results in darker occlusion.
   results in darker occlusion.
-  Since :abbr:`Screen-Space Ambient Occlusion (SSAO)` is a screen-space effect,
+  Since :abbr:`SSAO (Screen-Space Ambient Occlusion)` is a screen-space effect,
   it's recommended to remain conservative with this value.
   it's recommended to remain conservative with this value.
-  :abbr:`Screen-Space Ambient Occlusion (SSAO)` that is too strong can be
+  :abbr:`SSAO (Screen-Space Ambient Occlusion)` that is too strong can be
   distracting during gameplay.
   distracting during gameplay.
 - **Power:** The distribution of occlusion. A higher value results in darker
 - **Power:** The distribution of occlusion. A higher value results in darker
   occlusion, similar to **Intensity**, but with a sharper falloff.
   occlusion, similar to **Intensity**, but with a sharper falloff.
@@ -467,8 +470,9 @@ parameters:
 - **Light Affect:** The screen-space ambient occlusion intensity in direct
 - **Light Affect:** The screen-space ambient occlusion intensity in direct
   light. In real life, ambient occlusion only applies to indirect light, which
   light. In real life, ambient occlusion only applies to indirect light, which
   means its effects can't be seen in direct light. Values higher than 0 will
   means its effects can't be seen in direct light. Values higher than 0 will
-  make the SSAO effect visible in direct light. Values above ``0.0`` are not
-  physically accurate, but some artists prefer this effect.
+  make the :abbr:`SSAO (Screen-Space Ambient Occlusion)` effect visible in
+  direct light. Values above ``0.0`` are not physically accurate, but some
+  artists prefer this effect.
 
 
 Screen-Space Indirect Lighting (SSIL)
 Screen-Space Indirect Lighting (SSIL)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -476,25 +480,25 @@ Screen-Space Indirect Lighting (SSIL)
 *This feature is only available when using the Forward+ backend, not
 *This feature is only available when using the Forward+ backend, not
 Mobile or Compatibility.*
 Mobile or Compatibility.*
 
 
-:abbr:`Screen-Space Indirect Lighting (SSIL)` provides indirect lighting for
+:abbr:`SSIL (Screen-Space Indirect Lighting)` provides indirect lighting for
 small details or dynamic geometry that other global illumination techniques
 small details or dynamic geometry that other global illumination techniques
 cannot cover. This applies to bounced diffuse lighting, but also emissive
 cannot cover. This applies to bounced diffuse lighting, but also emissive
-materials. When :abbr:`Screen-Space Indirect Lighting (SSIL)` is enabled on its
+materials. When :abbr:`SSIL (Screen-Space Indirect Lighting)` is enabled on its
 own, the effect may not be that noticeable, which is intended.
 own, the effect may not be that noticeable, which is intended.
 
 
-Instead, :abbr:`Screen-Space Indirect Lighting (SSIL)` is meant to be used as a
+Instead, :abbr:`SSIL (Screen-Space Indirect Lighting)` is meant to be used as a
 *complement* to other global illumination techniques such as VoxelGI, SDFGI and
 *complement* to other global illumination techniques such as VoxelGI, SDFGI and
-LightmapGI. :abbr:`Screen-Space Indirect Lighting (SSIL)` also provides
+LightmapGI. :abbr:`SSIL (Screen-Space Indirect Lighting)` also provides
 a subtle ambient occlusion effect, similar to SSAO but with less detail.
 a subtle ambient occlusion effect, similar to SSAO but with less detail.
 
 
 This feature only provides indirect lighting. It is not a full global illumination
 This feature only provides indirect lighting. It is not a full global illumination
 solution. This makes it different from screen-space global illumination (SSGI)
 solution. This makes it different from screen-space global illumination (SSGI)
-offered by other 3D engines. :abbr:`Screen-Space Indirect Lighting (SSIL)`
-can be combined with :abbr:`Screen-Space Reflections (SSR)` and/or
-:abbr:`Screen-Space Ambient Occlusion (SSAO)` for greater visual quality
+offered by other 3D engines. :abbr:`SSIL (Screen-Space Indirect Lighting)`
+can be combined with :abbr:`SSR (Screen-Space Reflections)` and/or
+:abbr:`SSAO (Screen-Space Ambient Occlusion)` for greater visual quality
 (at the cost of performance).
 (at the cost of performance).
 
 
-Tweaking SSIL is possible with several parameters:
+Tweaking :abbr:`SSIL (Screen-Space Indirect Lighting)` is possible with several parameters:
 
 
 - **Radius:** The distance that bounced lighting can travel when using the
 - **Radius:** The distance that bounced lighting can travel when using the
   screen space indirect lighting effect. A larger value will result in light
   screen space indirect lighting effect. A larger value will result in light
@@ -524,7 +528,7 @@ Mobile or Compatibility.*
 
 
 Signed distance field global illumination (SDFGI) is a form of real-time global
 Signed distance field global illumination (SDFGI) is a form of real-time global
 illumination. It is not a screen-space effect, which means it can provide global
 illumination. It is not a screen-space effect, which means it can provide global
-illumination for off-screen elements (unlike :abbr:`Screen-Space Indirect Lighting (SSIL)`).
+illumination for off-screen elements (unlike :abbr:`SSIL (Screen-Space Indirect Lighting)`).
 
 
 .. seealso::
 .. seealso::
 
 

二進制
tutorials/3d/img/3d_rendering_limitations_banding.webp


二進制
tutorials/3d/img/3d_rendering_limitations_transparency_sorting.webp


二進制
tutorials/3d/img/3d_rendering_limitations_z_fighting.webp


+ 2 - 2
tutorials/3d/introduction_to_3d.rst

@@ -44,8 +44,8 @@ little more difficult. The content needs to be created with special 3D tools
 exchange file format to be imported in Godot. This is required since 3D formats
 exchange file format to be imported in Godot. This is required since 3D formats
 are not as standardized as images.
 are not as standardized as images.
 
 
-Maually authored models (using 3D modeling software)
-----------------------------------------------------
+Manually authored models (using 3D modeling software)
+-----------------------------------------------------
 
 
 .. FIXME: Needs update to properly description Godot 3.x workflow
 .. FIXME: Needs update to properly description Godot 3.x workflow
    (used to reference a non existing doc_importing_3d_meshes importer).
    (used to reference a non existing doc_importing_3d_meshes importer).

+ 24 - 24
tutorials/3d/procedural_geometry/immediatemesh.rst

@@ -10,30 +10,30 @@ API like SurfaceTool, but it's actually designed to create meshes on the fly.
 Generating complex geometry (several thousand vertices) with this node is inefficient, even if it's
 Generating complex geometry (several thousand vertices) with this node is inefficient, even if it's
 done only once. Instead, it is designed to generate simple geometry that changes every frame.
 done only once. Instead, it is designed to generate simple geometry that changes every frame.
 
 
-Before starting, you should clear the geometry by calling ``clear()``. This ensures that
+Before starting, you should clear the geometry by calling ``clear_surfaces()``. This ensures that
 you are not building upon the geometry from the previous frame. If you want to keep geometry between frames, do
 you are not building upon the geometry from the previous frame. If you want to keep geometry between frames, do
-not call ``clear()``.
+not call ``clear_surfaces()``.
 
 
-To begin generating geometry you must call ``begin()``. ``begin()`` takes a ``PrimitiveType`` as an argument.
+To begin generating geometry you must call ``surface_begin()``. ``surface_begin()`` takes a ``PrimitiveType`` as an argument.
 ``PrimitiveType`` is an OpenGL concept that instructs the GPU how to arrange the primitive based on the
 ``PrimitiveType`` is an OpenGL concept that instructs the GPU how to arrange the primitive based on the
 vertices given whether it is triangles, lines, points, etc. A complete list can be found under
 vertices given whether it is triangles, lines, points, etc. A complete list can be found under
 the :ref:`Mesh <class_mesh>` class reference page.
 the :ref:`Mesh <class_mesh>` class reference page.
 
 
-Once you have called ``begin()`` you are ready to start adding vertices. You add vertices one at a time.
-First you add vertex specific attributes such as normals or UVs using ``set_****()`` (e.g. ``set_normal()``).
-Then you call ``add_vertex()`` to add a vertex with those attributes. For example:
+Once you have called ``surface_begin()`` you are ready to start adding vertices. You add vertices one at a time.
+First you add vertex specific attributes such as normals or UVs using ``surface_set_****()`` (e.g. ``surface_set_normal()``).
+Then you call ``surface_add_vertex()`` to add a vertex with those attributes. For example:
 
 
 .. tabs::
 .. tabs::
   .. code-tab:: gdscript GDScript
   .. code-tab:: gdscript GDScript
 
 
     # Add a vertex with normal and uv.
     # Add a vertex with normal and uv.
-    set_normal(Vector3(0, 1, 0))
-    set_uv(Vector2(1, 1))
-    add_vertex(Vector3(0, 0, 1))
+    surface_set_normal(Vector3(0, 1, 0))
+    surface_set_uv(Vector2(1, 1))
+    surface_add_vertex(Vector3(0, 0, 1))
 
 
-Only attributes added before the call to ``add_vertex()`` will be included in that vertex.
+Only attributes added before the call to ``surface_add_vertex()`` will be included in that vertex.
 
 
-Finally, once you have added all your vertices call ``end()`` to signal that you have finished generating the mesh.
+Finally, once you have added all your vertices call ``surface_end()`` to signal that you have finished generating the mesh.
 
 
 The example code below draws a single triangle.
 The example code below draws a single triangle.
 
 
@@ -44,24 +44,24 @@ The example code below draws a single triangle.
 
 
     func _process(_delta):
     func _process(_delta):
         # Clean up before drawing.
         # Clean up before drawing.
-        clear()
+        clear_surfaces()
 
 
         # Begin draw.
         # Begin draw.
-        begin(Mesh.PRIMITIVE_TRIANGLES)
+        surface_begin(Mesh.PRIMITIVE_TRIANGLES)
 
 
-        # Prepare attributes for add_vertex.
-        set_normal(Vector3(0, 0, 1))
-        set_uv(Vector2(0, 0))
+        # Prepare attributes for surface_add_vertex.
+        surface_set_normal(Vector3(0, 0, 1))
+        surface_set_uv(Vector2(0, 0))
         # Call last for each vertex, adds the above attributes.
         # Call last for each vertex, adds the above attributes.
-        add_vertex(Vector3(-1, -1, 0))
+        surface_add_vertex(Vector3(-1, -1, 0))
 
 
-        set_normal(Vector3(0, 0, 1))
-        set_uv(Vector2(0, 1))
-        add_vertex(Vector3(-1, 1, 0))
+        surface_set_normal(Vector3(0, 0, 1))
+        surface_set_uv(Vector2(0, 1))
+        surface_add_vertex(Vector3(-1, 1, 0))
 
 
-        set_normal(Vector3(0, 0, 1))
-        set_uv(Vector2(1, 1))
-        add_vertex(Vector3(1, 1, 0))
+        surface_set_normal(Vector3(0, 0, 1))
+        surface_set_uv(Vector2(1, 1))
+        surface_add_vertex(Vector3(1, 1, 0))
 
 
         # End drawing.
         # End drawing.
-        end()
+        surface_end()

+ 1 - 1
tutorials/best_practices/logic_preferences.rst

@@ -16,7 +16,7 @@ properties such as the node's name or position. A common dilemma is, when
 should you change those values?
 should you change those values?
 
 
 It is the best practice to change values on a node before adding it to the
 It is the best practice to change values on a node before adding it to the
-scene tree. Some properties setters have code to update other
+scene tree. Some property's setters have code to update other
 corresponding values, and that code can be slow! For most cases, this code
 corresponding values, and that code can be slow! For most cases, this code
 has no impact on your game's performance, but in heavy use cases such as
 has no impact on your game's performance, but in heavy use cases such as
 procedural generation, it can bring your game to a crawl.
 procedural generation, it can bring your game to a crawl.

+ 2 - 2
tutorials/editor/managing_editor_features.rst

@@ -27,7 +27,7 @@ will open the **Manage Editor Feature Profiles** window. By default there
 will be no profile. Click on **Create Profile** and give it a name. You will
 will be no profile. Click on **Create Profile** and give it a name. You will
 then see a list of all the features in the Godot editor.
 then see a list of all the features in the Godot editor.
 
 
-..img:: img/configure_profile.png
+.. image:: img/configure_profile.png
 
 
 The first section allows major editor features to be removed, such as the 3D
 The first section allows major editor features to be removed, such as the 3D
 editor or scripting editor. Below the main features is every class and node in
 editor or scripting editor. Below the main features is every class and node in
@@ -35,7 +35,7 @@ Godot, which can be disabled as well. Click on a node and all of its properties
 and options will be listed in the **Extra Items** box, these can all be
 and options will be listed in the **Extra Items** box, these can all be
 individually disabled.
 individually disabled.
 
 
-..img:: img/node_features.png
+.. image:: img/node_features.png
 
 
 Sharing a profile
 Sharing a profile
 -----------------
 -----------------

+ 9 - 3
tutorials/export/exporting_for_android.rst

@@ -29,8 +29,8 @@ Download and install the Android SDK.
   - Ensure that the `required packages <https://developer.android.com/studio/intro/update#recommended>`__ are installed as well.
   - Ensure that the `required packages <https://developer.android.com/studio/intro/update#recommended>`__ are installed as well.
 
 
     - Android SDK Platform-Tools version 30.0.5 or later
     - Android SDK Platform-Tools version 30.0.5 or later
-    - Android SDK Build-Tools version 30.0.3
-    - Android SDK Platform 31
+    - Android SDK Build-Tools version 33.0.2
+    - Android SDK Platform 33
     - Android SDK Command-line Tools (latest)
     - Android SDK Command-line Tools (latest)
     - CMake version 3.10.2.4988404
     - CMake version 3.10.2.4988404
     - NDK version r23c (23.2.8568313)
     - NDK version r23c (23.2.8568313)
@@ -41,7 +41,7 @@ Download and install the Android SDK.
 
 
 ::
 ::
 
 
-    sdkmanager --sdk_root=<android_sdk_path> "platform-tools" "build-tools;30.0.3" "platforms;android-31" "cmdline-tools;latest" "cmake;3.10.2.4988404" "ndk;21.4.7075529"
+    sdkmanager --sdk_root=<android_sdk_path> "platform-tools" "build-tools;33.0.2" "platforms;android-33" "cmdline-tools;latest" "cmake;3.10.2.4988404" "ndk;23.2.8568313"
 
 
 .. note::
 .. note::
 
 
@@ -64,6 +64,12 @@ the JDK can be used for this purpose::
 
 
 This will create a ``debug.keystore`` file in your current directory. You should move it to a memorable location such as ``%USERPROFILE%\.android\``, because you will need its location in a later step. For more information on ``keytool`` usage, see `this Q&A article <https://godotengine.org/qa/21349/jdk-android-file-missing>`__.
 This will create a ``debug.keystore`` file in your current directory. You should move it to a memorable location such as ``%USERPROFILE%\.android\``, because you will need its location in a later step. For more information on ``keytool`` usage, see `this Q&A article <https://godotengine.org/qa/21349/jdk-android-file-missing>`__.
 
 
+.. note::
+
+   It is important that the password is the same for the keystore and the key. This is a `known Android
+   studio issue <https://developer.android.com/studio/known-issues#ki-key-keystore-warning>`__ that also
+   affects Godot projects.
+
 Setting it up in Godot
 Setting it up in Godot
 ----------------------
 ----------------------
 
 

+ 1 - 1
tutorials/inputs/controllers_gamepads_joysticks.rst

@@ -129,7 +129,7 @@ use ``Input.is_action_pressed()``:
     frame, use ``Input.is_action_just_pressed()`` instead of
     frame, use ``Input.is_action_just_pressed()`` instead of
     ``Input.is_action_pressed()``. Unlike ``Input.is_action_pressed()`` which
     ``Input.is_action_pressed()``. Unlike ``Input.is_action_pressed()`` which
     returns ``true`` as long as the input is
     returns ``true`` as long as the input is
-    held,``Input.is_action_just_pressed()`` will only return ``true`` for one
+    held, ``Input.is_action_just_pressed()`` will only return ``true`` for one
     frame after the button has been pressed.
     frame after the button has been pressed.
 
 
 In Godot versions before 3.4, such as 3.3, ``Input.get_vector()`` and
 In Godot versions before 3.4, such as 3.3, ``Input.get_vector()`` and

+ 17 - 7
tutorials/inputs/custom_mouse_cursor.rst

@@ -3,7 +3,9 @@
 Customizing the mouse cursor
 Customizing the mouse cursor
 ============================
 ============================
 
 
-You might want to change the appearance of the mouse cursor in your game in order to suit the overall design. There are two ways to customize the mouse cursor:
+You might want to change the appearance of the mouse cursor in your game in
+order to suit the overall design. There are two ways to customize the mouse
+cursor:
 
 
 1. Using project settings
 1. Using project settings
 2. Using a script
 2. Using a script
@@ -14,8 +16,8 @@ The second way is more customizable, but involves scripting:
 .. note::
 .. note::
 
 
     You could display a "software" mouse cursor by hiding the mouse cursor and
     You could display a "software" mouse cursor by hiding the mouse cursor and
-    moving a Sprite2D to the cursor position in a ``_process`` method, but this
-    will add at least one frame of latency compared to an "hardware" mouse
+    moving a Sprite2D to the cursor position in a ``_process()`` method, but
+    this will add at least one frame of latency compared to an "hardware" mouse
     cursor. Therefore, it's recommended to use the approach described here
     cursor. Therefore, it's recommended to use the approach described here
     whenever possible.
     whenever possible.
 
 
@@ -32,7 +34,12 @@ Open project settings, go to Display>Mouse Cursor. You will see Custom Image and
 Custom Image is the desired image that you would like to set as the mouse cursor.
 Custom Image is the desired image that you would like to set as the mouse cursor.
 Custom Hotspot is the point in the image that you would like to use as the cursor's detection point.
 Custom Hotspot is the point in the image that you would like to use as the cursor's detection point.
 
 
-.. note:: The custom image **must** be less than 256x256.
+.. warning::
+
+    The custom image **must** be 256×256 pixels at most. To avoid rendering
+    issues, sizes lower than or equal to 128×128 are recommended.
+
+    On the web platform, the maximum allowed cursor image size is 128×128.
 
 
 Using a script
 Using a script
 --------------
 --------------
@@ -74,9 +81,10 @@ Create a Node and attach the following script.
         Input.SetCustomMouseCursor(beam, Input.CursorShape.Ibeam);
         Input.SetCustomMouseCursor(beam, Input.CursorShape.Ibeam);
     }
     }
 
 
-.. note::
-    Check :ref:`Input.set_custom_mouse_cursor() <class_Input_method_set_custom_mouse_cursor>`.
+.. seealso::
 
 
+    Check :ref:`Input.set_custom_mouse_cursor() <class_Input_method_set_custom_mouse_cursor>`'s
+    documentation for more information on usage and platform-specific caveats.
 
 
 Demo project
 Demo project
 ------------
 ------------
@@ -87,4 +95,6 @@ https://github.com/guilhermefelipecgs/custom_hardware_cursor
 Cursor list
 Cursor list
 -----------
 -----------
 
 
-As documented in the :ref:`Input <class_Input>` class (see the **CursorShape** enum), there are multiple mouse cursors you can define. Which ones you want to use depends on your use case.
+As documented in the :ref:`Input <class_Input>` class (see the **CursorShape**
+enum), there are multiple mouse cursors you can define. Which ones you want to
+use depends on your use case.

+ 1 - 1
tutorials/inputs/inputevent.rst

@@ -117,7 +117,7 @@ received input, in order:
    not. This can be configured through :ref:`Area3D <class_Area3D>` properties).
    not. This can be configured through :ref:`Area3D <class_Area3D>` properties).
    In the case of a 2D scene, conceptually the same happens with :ref:`CollisionObject2D._input_event() <class_CollisionObject2D_method__input_event>`.
    In the case of a 2D scene, conceptually the same happens with :ref:`CollisionObject2D._input_event() <class_CollisionObject2D_method__input_event>`.
 
 
-When sending events to its child and descencand nodes, the viewport will do so, as depicted in
+When sending events to its child and descendant nodes, the viewport will do so, as depicted in
 the following graphic, in a reverse depth-first order, starting with the node at the bottom of
 the following graphic, in a reverse depth-first order, starting with the node at the bottom of
 the scene tree, and ending at the root node. Excluded from this process are embedded Windows
 the scene tree, and ending at the root node. Excluded from this process are embedded Windows
 and SubViewports.
 and SubViewports.

+ 17 - 6
tutorials/navigation/navigation_introduction_2d.rst

@@ -31,6 +31,8 @@ Godot provides the following objects and classes for 2D navigation:
         - NavRegion RID
         - NavRegion RID
             Reference to a specific navigation region that can hold navigation mesh data.
             Reference to a specific navigation region that can hold navigation mesh data.
             The region can be enabled / disabled or the use restricted with a navigationlayer bitmask.
             The region can be enabled / disabled or the use restricted with a navigationlayer bitmask.
+        - NavLink RID
+            Reference to a specific navigation link that connects two navigation mesh positions over arbitrary distances.
         - NavAgent RID
         - NavAgent RID
             Reference to a specific avoidance agent with a radius value use solely in avoidance.
             Reference to a specific avoidance agent with a radius value use solely in avoidance.
 
 
@@ -38,9 +40,19 @@ The following SceneTree Nodes are available as helpers to work with the Navigati
 
 
 - :ref:`NavigationRegion2D<class_NavigationRegion2D>` Node
 - :ref:`NavigationRegion2D<class_NavigationRegion2D>` Node
     A Node that holds a NavigationPolygon resource that defines a navigation mesh for the NavigationServer2D.
     A Node that holds a NavigationPolygon resource that defines a navigation mesh for the NavigationServer2D.
-    The region can be enabled / disabled.
-    The use in pathfinding can be further restricted through the navigationlayers bitmask.
-    Regions can join their navigation meshes by proximity for a combined navigation mesh.
+
+    - The region can be enabled / disabled.
+    - The use in pathfinding can be further restricted through the navigationlayers bitmask.
+    - Regions can join their navigation meshes by proximity for a combined navigation mesh.
+
+- :ref:`NavigationLink2D<class_NavigationLink2D>` Node
+    A Node that connects two positions on navigation mesh over arbitrary distances for pathfinding.
+
+    - The link can be enabled / disabled.
+    - The link can be made one-way or bidirectional.
+    - The use in pathfinding can be further restricted through the navigationlayers bitmask.
+
+    Links tell the pathfinding that a connection exists and at what cost. The actual agent handling and movement needs to happen in custom scripts.
 
 
 -  :ref:`NavigationAgent2D<class_NavigationAgent2D>` Node
 -  :ref:`NavigationAgent2D<class_NavigationAgent2D>` Node
     An optional helper Node to facilitate common NavigationServer2D API calls for pathfinding and avoidance
     An optional helper Node to facilitate common NavigationServer2D API calls for pathfinding and avoidance
@@ -133,15 +145,14 @@ NavigationServer2D and a NavigationAgent2D for path movement.
         if navigation_agent.is_navigation_finished():
         if navigation_agent.is_navigation_finished():
             return
             return
 
 
-        var current_agent_position: Vector2 = global_transform.origin
+        var current_agent_position: Vector2 = global_position
         var next_path_position: Vector2 = navigation_agent.get_next_path_position()
         var next_path_position: Vector2 = navigation_agent.get_next_path_position()
 
 
         var new_velocity: Vector2 = next_path_position - current_agent_position
         var new_velocity: Vector2 = next_path_position - current_agent_position
         new_velocity = new_velocity.normalized()
         new_velocity = new_velocity.normalized()
         new_velocity = new_velocity * movement_speed
         new_velocity = new_velocity * movement_speed
 
 
-        set_velocity(new_velocity)
-
+        velocity = new_velocity
         move_and_slide()
         move_and_slide()
 
 
  .. code-tab:: csharp C#
  .. code-tab:: csharp C#

+ 17 - 5
tutorials/navigation/navigation_introduction_3d.rst

@@ -34,6 +34,8 @@ Godot provides the following objects and classes for 3D navigation:
         - NavRegion RID
         - NavRegion RID
             Reference to a specific navigation region that can hold navigation mesh data.
             Reference to a specific navigation region that can hold navigation mesh data.
             The region can be enabled / disabled or the use restricted with a navigationlayer bitmask.
             The region can be enabled / disabled or the use restricted with a navigationlayer bitmask.
+        - NavLink RID
+            Reference to a specific navigation link that connects two navigation mesh positions over arbitrary distances.
         - NavAgent RID
         - NavAgent RID
             Reference to a specific avoidance agent with a radius value use solely in avoidance.
             Reference to a specific avoidance agent with a radius value use solely in avoidance.
 
 
@@ -41,9 +43,19 @@ The following SceneTree Nodes are available as helpers to work with the Navigati
 
 
 - :ref:`NavigationRegion3D<class_NavigationRegion3D>` Node
 - :ref:`NavigationRegion3D<class_NavigationRegion3D>` Node
     A Node that holds a Navigation Mesh resource that defines a navigation mesh for the NavigationServer3D.
     A Node that holds a Navigation Mesh resource that defines a navigation mesh for the NavigationServer3D.
-    The region can be enabled / disabled.
-    The use in pathfinding can be further restricted through the navigationlayers bitmask.
-    Regions can join their navigation meshes by proximity for a combined navigation mesh.
+
+    - The region can be enabled / disabled.
+    - The use in pathfinding can be further restricted through the navigationlayers bitmask.
+    - Regions can join their navigation meshes by proximity for a combined navigation mesh.
+
+- :ref:`NavigationLink3D<class_NavigationLink3D>` Node
+    A Node that connects two positions on navigation mesh over arbitrary distances for pathfinding.
+
+    - The link can be enabled / disabled.
+    - The link can be made one-way or bidirectional.
+    - The use in pathfinding can be further restricted through the navigationlayers bitmask.
+
+    Links tell the pathfinding that a connection exists and at what cost. The actual agent handling and movement needs to happen in custom scripts.
 
 
 -  :ref:`NavigationAgent3D<class_NavigationAgent3D>` Node
 -  :ref:`NavigationAgent3D<class_NavigationAgent3D>` Node
     An optional helper Node to facilitate common NavigationServer3D API calls for pathfinding and avoidance for
     An optional helper Node to facilitate common NavigationServer3D API calls for pathfinding and avoidance for
@@ -138,14 +150,14 @@ a NavigationAgent3D for path movement.
         if navigation_agent.is_navigation_finished():
         if navigation_agent.is_navigation_finished():
             return
             return
 
 
-        var current_agent_position: Vector3 = global_transform.origin
+        var current_agent_position: Vector3 = global_position
         var next_path_position: Vector3 = navigation_agent.get_next_path_position()
         var next_path_position: Vector3 = navigation_agent.get_next_path_position()
 
 
         var new_velocity: Vector3 = next_path_position - current_agent_position
         var new_velocity: Vector3 = next_path_position - current_agent_position
         new_velocity = new_velocity.normalized()
         new_velocity = new_velocity.normalized()
         new_velocity = new_velocity * movement_speed
         new_velocity = new_velocity * movement_speed
 
 
-        set_velocity(new_velocity)
+        velocity = safe_velocity
         move_and_slide()
         move_and_slide()
 
 
  .. code-tab:: csharp C#
  .. code-tab:: csharp C#

+ 34 - 23
tutorials/navigation/navigation_using_navigationagents.rst

@@ -157,12 +157,14 @@ This script adds basic navigation movement to a Node3D with a NavigationAgent3D
  .. code-tab:: gdscript GDScript
  .. code-tab:: gdscript GDScript
 
 
     extends Node3D
     extends Node3D
-    # script on agent parent node, connect the agent 'velocity_computed' signal for collision avoidance
 
 
     @export var movement_speed: float = 4.0
     @export var movement_speed: float = 4.0
     @onready var navigation_agent: NavigationAgent3D = get_node("NavigationAgent3D")
     @onready var navigation_agent: NavigationAgent3D = get_node("NavigationAgent3D")
     var movement_delta: float
     var movement_delta: float
 
 
+    func _ready() -> void:
+        navigation_agent.velocity_computed.connect(Callable(_on_velocity_computed))
+
     func set_movement_target(movement_target: Vector3):
     func set_movement_target(movement_target: Vector3):
         navigation_agent.set_target_position(movement_target)
         navigation_agent.set_target_position(movement_target)
 
 
@@ -172,13 +174,15 @@ This script adds basic navigation movement to a Node3D with a NavigationAgent3D
 
 
         movement_delta = movement_speed * delta
         movement_delta = movement_speed * delta
         var next_path_position: Vector3 = navigation_agent.get_next_path_position()
         var next_path_position: Vector3 = navigation_agent.get_next_path_position()
-        var current_agent_position: Vector3 = global_transform.origin
+        var current_agent_position: Vector3 = global_position
         var new_velocity: Vector3 = (next_path_position - current_agent_position).normalized() * movement_delta
         var new_velocity: Vector3 = (next_path_position - current_agent_position).normalized() * movement_delta
-        navigation_agent.set_velocity(new_velocity)
+        if navigation_agent.avoidance_enabled:
+            navigation_agent.set_velocity(new_velocity)
+        else:
+            _on_velocity_computed(new_velocity)
 
 
-    func _on_NavigationAgent3D_velocity_computed(safe_velocity: Vector3):
-        # Move Node3D with the computed `safe_velocity` to avoid dynamic obstacles.
-        global_transform.origin = global_transform.origin.move_toward(global_transform.origin + safe_velocity, movement_delta)
+    func _on_velocity_computed(safe_velocity: Vector3) -> void:
+        global_position = global_position.move_toward(global_position + safe_velocity, movement_delta)
 
 
 Actor as CharacterBody3D
 Actor as CharacterBody3D
 ~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~
@@ -189,11 +193,12 @@ This script adds basic navigation movement to a CharacterBody3D with a Navigatio
  .. code-tab:: gdscript GDScript
  .. code-tab:: gdscript GDScript
 
 
     extends CharacterBody3D
     extends CharacterBody3D
-    # script on agent parent node, connect the agent 'velocity_computed' signal for collision avoidance
 
 
     @export var movement_speed: float = 4.0
     @export var movement_speed: float = 4.0
     @onready var navigation_agent: NavigationAgent3D = get_node("NavigationAgent3D")
     @onready var navigation_agent: NavigationAgent3D = get_node("NavigationAgent3D")
-    var movement_delta: float
+
+    func _ready() -> void:
+        navigation_agent.velocity_computed.connect(Callable(_on_velocity_computed))
 
 
     func set_movement_target(movement_target: Vector3):
     func set_movement_target(movement_target: Vector3):
         navigation_agent.set_target_position(movement_target)
         navigation_agent.set_target_position(movement_target)
@@ -202,14 +207,15 @@ This script adds basic navigation movement to a CharacterBody3D with a Navigatio
         if navigation_agent.is_navigation_finished():
         if navigation_agent.is_navigation_finished():
             return
             return
 
 
-        movement_delta = movement_speed * delta
         var next_path_position: Vector3 = navigation_agent.get_next_path_position()
         var next_path_position: Vector3 = navigation_agent.get_next_path_position()
-        var current_agent_position: Vector3 = global_transform.origin
-        var new_velocity: Vector3 = (next_path_position - current_agent_position).normalized() * movement_delta
-        navigation_agent.set_velocity(new_velocity)
-
-    func _on_NavigationAgent3D_velocity_computed(safe_velocity: Vector3):
-        # Move CharacterBody3D with the computed `safe_velocity` to avoid dynamic obstacles.
+        var current_agent_position: Vector3 = global_position
+        var new_velocity: Vector3 = (next_path_position - current_agent_position).normalized() * movement_speed
+        if navigation_agent.avoidance_enabled:
+            navigation_agent.set_velocity(new_velocity)
+        else:
+            _on_velocity_computed(new_velocity)
+
+    func _on_velocity_computed(safe_velocity: Vector3):
         velocity = safe_velocity
         velocity = safe_velocity
         move_and_slide()
         move_and_slide()
 
 
@@ -222,10 +228,13 @@ This script adds basic navigation movement to a RigidBody3D with a NavigationAge
  .. code-tab:: gdscript GDScript
  .. code-tab:: gdscript GDScript
 
 
     extends RigidBody3D
     extends RigidBody3D
-    # script on agent parent node, connect the agent 'velocity_computed' signal for collision avoidance
 
 
+    @export var movement_speed: float = 4.0
     @onready var navigation_agent: NavigationAgent3D = get_node("NavigationAgent3D")
     @onready var navigation_agent: NavigationAgent3D = get_node("NavigationAgent3D")
 
 
+    func _ready() -> void:
+        navigation_agent.velocity_computed.connect(Callable(_on_velocity_computed))
+
     func set_movement_target(movement_target: Vector3):
     func set_movement_target(movement_target: Vector3):
         navigation_agent.set_target_position(movement_target)
         navigation_agent.set_target_position(movement_target)
 
 
@@ -234,10 +243,12 @@ This script adds basic navigation movement to a RigidBody3D with a NavigationAge
             return
             return
 
 
         var next_path_position: Vector3 = navigation_agent.get_next_path_position()
         var next_path_position: Vector3 = navigation_agent.get_next_path_position()
-        var current_agent_position: Vector3 = global_transform.origin
-        var new_velocity: Vector3 = (next_path_position - current_agent_position).normalized() * velocity
-        navigation_agent.set_velocity(new_velocity)
-
-    func _on_NavigationAgent3D_velocity_computed(safe_velocity: Vector3):
-        # Move RigidBody3D with the computed `safe_velocity` to avoid dynamic obstacles.
-        set_linear_velocity(safe_velocity)
+        var current_agent_position: Vector3 = global_position
+        var new_velocity: Vector3 = (next_path_position - current_agent_position).normalized() * movement_speed
+        if navigation_agent.avoidance_enabled:
+            navigation_agent.set_velocity(new_velocity)
+        else:
+            _on_velocity_computed(new_velocity)
+
+    func _on_velocity_computed(safe_velocity: Vector3):
+        linear_velocity = safe_velocity

+ 3 - 5
tutorials/navigation/navigation_using_navigationmeshes.rst

@@ -158,12 +158,10 @@ navigationmesh from outline data the shapes cannot overlap.
 
 
             if node is CollisionPolygon2D:
             if node is CollisionPolygon2D:
 
 
-                var new_collision_outline: PackedVector2Array = PackedVector2Array()
                 var collisionpolygon_transform: Transform2D = node.get_global_transform()
                 var collisionpolygon_transform: Transform2D = node.get_global_transform()
-                var collisionpolygon: CollisionPolygon2D = node.get_polygon()
+                var collisionpolygon: PackedVector2Array = node.polygon
 
 
-                for vertex in collisionpolygon:
-                    new_collision_outline.append(collisionpolygon_transform.xform(vertex))
+                var new_collision_outline: PackedVector2Array = collisionpolygon_transform * collisionpolygon
 
 
                 new_navigation_polygon.add_outline(new_collision_outline)
                 new_navigation_polygon.add_outline(new_collision_outline)
 
 
@@ -188,7 +186,7 @@ The following script creates a new 2D navigation region and fills it with proced
         Vector2(50.0, 0.0),
         Vector2(50.0, 0.0),
         Vector2(50.0, 50.0),
         Vector2(50.0, 50.0),
         Vector2(0.0, 50.0),
         Vector2(0.0, 50.0),
-        ])
+    ])
     new_navigation_polygon.add_outline(new_outline)
     new_navigation_polygon.add_outline(new_outline)
     new_navigation_polygon.make_polygons_from_outlines()
     new_navigation_polygon.make_polygons_from_outlines()
 
 

+ 87 - 64
tutorials/networking/http_request_class.rst

@@ -1,70 +1,91 @@
-:article_outdated: True
-
 .. _doc_http_request_class:
 .. _doc_http_request_class:
 
 
 Making HTTP requests
 Making HTTP requests
 ====================
 ====================
 
 
+Why use HTTP?
+-------------
+
+`HTTP requests <https://developer.mozilla.org/en-US/docs/Web/HTTP>`_ are useful
+to communicate with web servers and other non-Godot programs.
+
+Compared to Godot's other networking features (like
+:ref:`High-level multiplayer <doc_high_level_multiplayer>`),
+HTTP requests have more overhead and take more time to get going,
+so they aren't suited for real-time communication, and aren't great to send
+lots of small updates as is common for multiplayer gameplay.
+
+HTTP, however, offers interoperability with external
+web resources and is great at sending and receiving large amounts
+of data, for example to transfer files like game assets.
+
+So HTTP may be useful for your game's login system, lobby browser,
+to retrieve some information from the web or to download game assets.
+
+This tutorial assumes some familiarity with Godot and the Godot Editor.
+Refer to the :ref:`Introduction <toc-learn-introduction>` and the
+:ref:`Step by step <toc-learn-step_by_step>` tutorial, especially its
+:ref:`Nodes and Scenes <doc_nodes_and_scenes>` and
+:ref:`Creating your first script <doc_scripting_first_script>` pages if needed.
+
+HTTP requests in Godot
+----------------------
+
 The :ref:`HTTPRequest <class_HTTPRequest>` node is the easiest way to make HTTP requests in Godot.
 The :ref:`HTTPRequest <class_HTTPRequest>` node is the easiest way to make HTTP requests in Godot.
-It is backed by the more low-level :ref:`HTTPClient <class_HTTPClient>`, for which a tutorial is available :ref:`here <doc_http_client_class>`.
+It is backed by the more low-level :ref:`HTTPClient <class_HTTPClient>`,
+for which a tutorial is available :ref:`here <doc_http_client_class>`.
 
 
-For the sake of this example, we will create a simple UI with a button, that when pressed will start the HTTP request to the specified URL.
+For this example, we will make an HTTP request to GitHub to retrieve the name
+of the latest Godot release.
 
 
 .. warning::
 .. warning::
 
 
-    When exporting to Android, make sure to enable the ``INTERNET``
+    When exporting to **Android**, make sure to enable the **Internet**
     permission in the Android export preset before exporting the project or
     permission in the Android export preset before exporting the project or
     using one-click deploy. Otherwise, network communication of any kind will be
     using one-click deploy. Otherwise, network communication of any kind will be
-    blocked by Android.
+    blocked by the Android OS.
 
 
-Preparing scene
----------------
+Preparing the scene
+-------------------
 
 
-Create a new empty scene, add a CanvasLayer as the root node and add a script to it. Then add two child nodes to it: a Button and an HTTPRequest node. You will need to connect the following signals to the CanvasLayer script:
+Create a new empty scene, add a root :ref:`Node <class_Node>` and add a script to it.
+Then add a :ref:`HTTPRequest <class_HTTPRequest>` node as a child.
 
 
-- Button.pressed: When the button is pressed, we will start the request.
-- HTTPRequest.request_completed: When the request is completed, we will get the requested data as an argument.
+.. image:: img/rest_api_scene.webp
 
 
-.. image:: img/rest_api_scene.png
+Scripting the request
+---------------------
 
 
-Scripting
----------
-
-Below is all the code we need to make it work. The URL points to an online API mocker; it returns a predefined JSON string, which we will then parse to get access to the data.
+When the project is started (so in ``_ready()``), we're going to send an HTTP request
+to Github using our :ref:`HTTPRequest <class_HTTPRequest>` node,
+and once the request completes, we're going to parse the returned JSON data,
+look for the ``name`` field and print that to console.
 
 
 .. tabs::
 .. tabs::
 
 
     .. code-tab:: gdscript GDScript
     .. code-tab:: gdscript GDScript
 
 
-        extends CanvasLayer
+        extends Node
 
 
         func _ready():
         func _ready():
-            $HTTPRequest.connect("request_completed", self, "_on_request_completed")
-            $Button.connect("pressed", self, "_on_Button_pressed")
-
-        func _on_Button_pressed():
-            $HTTPRequest.request("http://www.mocky.io/v2/5185415ba171ea3a00704eed")
+            $HTTPRequest.request_completed.connect(_on_request_completed)
+            $HTTPRequest.request("https://api.github.com/repos/godotengine/godot/releases/latest")
 
 
         func _on_request_completed(result, response_code, headers, body):
         func _on_request_completed(result, response_code, headers, body):
-            var json = JSON.parse(body.get_string_from_utf8())
-            print(json.result)
+            var json = JSON.parse_string(body.get_string_from_utf8())
+            print(json["name"])
 
 
     .. code-tab:: csharp
     .. code-tab:: csharp
 
 
         using Godot;
         using Godot;
-        
-        public partial class MyCanvasLayer : CanvasLayer
+
+        public partial class MyNode : Node
         {
         {
             public override void _Ready()
             public override void _Ready()
             {
             {
                 GetNode("HTTPRequest").RequestCompleted += OnRequestCompleted;
                 GetNode("HTTPRequest").RequestCompleted += OnRequestCompleted;
-                GetNode("Button").Pressed += OnButtonPressed;
-            }
-
-            private void OnButtonPressed()
-            {
                 HttpRequest httpRequest = GetNode<HttpRequest>("HTTPRequest");
                 HttpRequest httpRequest = GetNode<HttpRequest>("HTTPRequest");
-                httpRequest.Request("http://www.mocky.io/v2/5185415ba171ea3a00704eed");
+                httpRequest.Request("https://api.github.com/repos/godotengine/godot/releases/latest");
             }
             }
 
 
             private void OnRequestCompleted(long result, long responseCode, string[] headers, byte[] body)
             private void OnRequestCompleted(long result, long responseCode, string[] headers, byte[] body)
@@ -74,58 +95,60 @@ Below is all the code we need to make it work. The URL points to an online API m
             }
             }
         }
         }
 
 
-With this, you should see ``(hello:world)`` printed on the console; ``hello`` being a key, ``world`` being a value, and both of them are of type :ref:`String <class_string>`.
-
+Save the script and the scene, and run the project.
+The name of the most recent Godot release on Github should be printed to the output log.
 For more information on parsing JSON, see the class references for :ref:`JSON <class_JSON>`.
 For more information on parsing JSON, see the class references for :ref:`JSON <class_JSON>`.
 
 
-Note that you may want to check whether the ``result`` equals ``RESULT_SUCCESS`` and whether a JSON parsing error occurred, see the JSON class reference and :ref:`HTTPRequest <class_HTTPRequest>` for more.
+Note that you may want to check whether the ``result`` equals ``RESULT_SUCCESS``
+and whether a JSON parsing error occurred, see the JSON class reference and
+:ref:`HTTPRequest <class_HTTPRequest>` for more.
+
+You have to wait for a request to finish before sending another one.
+Making multiple request at once requires you to have one node per request.
+A common strategy is to create and delete HTTPRequest nodes at runtime as necessary.
 
 
-Of course, you can also set custom HTTP headers. These are given as a string array, with each string containing a header in the format ``"header: value"``.
-For example, to set a custom user agent (the HTTP ``user-agent`` header) you could use the following:
+Sending data to the server
+--------------------------
+
+Until now, we have limited ourselves to requesting data from a server.
+But what if you need to send data to the server? Here is a common way of doing it:
 
 
 .. tabs::
 .. tabs::
 
 
     .. code-tab:: gdscript GDScript
     .. code-tab:: gdscript GDScript
 
 
-        $HTTPRequest.request("http://www.mocky.io/v2/5185415ba171ea3a00704eed", ["user-agent: YourCustomUserAgent"])
+        var json = JSON.stringify(data_to_send)
+        var headers = ["Content-Type: application/json"]
+        $HTTPRequest.request(url, headers, HTTPClient.METHOD_POST, json)
 
 
     .. code-tab:: csharp
     .. code-tab:: csharp
 
 
+        string json = Json.Stringify(dataToSend);
+        string[] headers = new string[] { "Content-Type: application/json" };
         HttpRequest httpRequest = GetNode<HttpRequest>("HTTPRequest");
         HttpRequest httpRequest = GetNode<HttpRequest>("HTTPRequest");
-        httpRequest.Request("http://www.mocky.io/v2/5185415ba171ea3a00704eed", new string[] { "user-agent: YourCustomUserAgent" });
-
-Please note that, for SSL/TLS encryption and thus HTTPS URLs to work, you may need to take some steps as described :ref:`here <doc_ssl_certificates>`.
-
-Also, when calling APIs using authorization, be aware that someone might analyse and decompile your released application and thus may gain access to any embedded authorization information like tokens, usernames or passwords.
-That means it is usually not a good idea to embed things such as database access credentials inside your game. Avoid providing information useful to an attacker whenever possible.
+        httpRequest.Request(url, headers, HttpClient.Method.Post, json);
 
 
-Sending data to server
-----------------------
+Setting custom HTTP headers
+---------------------------
 
 
-Until now, we have limited ourselves to requesting data from a server. But what if you need to send data to the server? Here is a common way of doing it:
+Of course, you can also set custom HTTP headers. These are given as a string array,
+with each string containing a header in the format ``"header: value"``.
+For example, to set a custom user agent (the HTTP ``User-Agent`` header) you could use the following:
 
 
 .. tabs::
 .. tabs::
 
 
     .. code-tab:: gdscript GDScript
     .. code-tab:: gdscript GDScript
 
 
-        func _make_post_request(url, data_to_send, use_ssl):
-            # Convert data to json string:
-            var query = JSON.stringify(data_to_send)
-            # Add 'Content-Type' header:
-            var headers = ["Content-Type: application/json"]
-            $HTTPRequest.request(url, headers, use_ssl, HTTPClient.METHOD_POST, query)
+        $HTTPRequest.request("https://api.github.com/repos/godotengine/godot/releases/latest", ["User-Agent: YourCustomUserAgent"])
 
 
     .. code-tab:: csharp
     .. code-tab:: csharp
 
 
-        public void MakePostRequest(string url, Variant dataToSend, bool useSsl)
-        {
-            // Convert data to json string:
-            string query = Json.Stringify(dataToSend);
-            // Add 'Content-Type' header:
-            string[] headers = new string[] { "Content-Type: application/json" };
-            HttpRequest httpRequest = GetNode<HttpRequest>("HTTPRequest");
-            httpRequest.Request(url, headers, useSsl, HttpClient.Method.Post, query);
-        }
+        HttpRequest httpRequest = GetNode<HttpRequest>("HTTPRequest");
+        httpRequest.Request("https://api.github.com/repos/godotengine/godot/releases/latest", new string[] { "User-Agent: YourCustomUserAgent" });
 
 
-Keep in mind that you have to wait for a request to finish before sending another one. Making multiple request at once requires you to have one node per request.
-A common strategy is to create and delete HTTPRequest nodes at runtime as necessary.
+.. warning::
+
+    Be aware that someone might analyse and decompile your released application and
+    thus may gain access to any embedded authorization information like tokens, usernames or passwords.
+    That means it is usually not a good idea to embed things such as database
+    access credentials inside your game. Avoid providing information useful to an attacker whenever possible.

二進制
tutorials/networking/img/rest_api_scene.png


二進制
tutorials/networking/img/rest_api_scene.webp


+ 0 - 4
tutorials/performance/using_multimesh.rst

@@ -63,8 +63,6 @@ efficient for millions of objects, but for a few thousands, GDScript should be f
         multimesh = MultiMesh.new()
         multimesh = MultiMesh.new()
         # Set the format first.
         # Set the format first.
         multimesh.transform_format = MultiMesh.TRANSFORM_3D
         multimesh.transform_format = MultiMesh.TRANSFORM_3D
-        multimesh.color_format = MultiMesh.COLOR_NONE
-        multimesh.custom_data_format = MultiMesh.CUSTOM_DATA_NONE
         # Then resize (otherwise, changing the format is not allowed).
         # Then resize (otherwise, changing the format is not allowed).
         multimesh.instance_count = 10000
         multimesh.instance_count = 10000
         # Maybe not all of them should be visible at first.
         # Maybe not all of them should be visible at first.
@@ -86,8 +84,6 @@ efficient for millions of objects, but for a few thousands, GDScript should be f
             Multimesh = new MultiMesh();
             Multimesh = new MultiMesh();
             // Set the format first.
             // Set the format first.
             Multimesh.TransformFormat = MultiMesh.TransformFormatEnum.Transform3D;
             Multimesh.TransformFormat = MultiMesh.TransformFormatEnum.Transform3D;
-            Multimesh.ColorFormat = MultiMesh.ColorFormatEnum.None;
-            Multimesh.CustomDataFormat = MultiMesh.CustomDataFormatEnum.None;
             // Then resize (otherwise, changing the format is not allowed)
             // Then resize (otherwise, changing the format is not allowed)
             Multimesh.InstanceCount = 1000;
             Multimesh.InstanceCount = 1000;
             // Maybe not all of them should be visible at first.
             // Maybe not all of them should be visible at first.

+ 1 - 1
tutorials/performance/vertex_animation/animating_thousands_of_fish.rst

@@ -26,7 +26,7 @@ Here is the fish we will be using for the example images, you can use any fish m
 
 
 .. image:: img/fish.png
 .. image:: img/fish.png
 
 
-.. note:: The fish model in this tutorial is made by `QuaterniusDev <http://quaternius.com>`_ and is
+.. note:: The fish model in this tutorial is made by `QuaterniusDev <https://quaternius.com>`_ and is
           shared with a creative commons license. CC0 1.0 Universal (CC0 1.0) Public Domain
           shared with a creative commons license. CC0 1.0 Universal (CC0 1.0) Public Domain
           Dedication https://creativecommons.org/publicdomain/zero/1.0/
           Dedication https://creativecommons.org/publicdomain/zero/1.0/
 
 

+ 1 - 0
tutorials/physics/index.rst

@@ -16,3 +16,4 @@ Physics
    collision_shapes_2d
    collision_shapes_2d
    collision_shapes_3d
    collision_shapes_3d
    large_world_coordinates
    large_world_coordinates
+   troubleshooting_physics_issues

+ 2 - 0
tutorials/physics/large_world_coordinates.rst

@@ -1,3 +1,5 @@
+.. _doc_large_world_coordinates:
+
 Large world coordinates
 Large world coordinates
 =======================
 =======================
 
 

+ 166 - 0
tutorials/physics/troubleshooting_physics_issues.rst

@@ -0,0 +1,166 @@
+.. _doc_troubleshooting_physics_issues:
+
+Troubleshooting physics issues
+==============================
+
+When working with a physics engine, you may encounter unexpected results.
+
+While many of these issues can be resolved through configuration, some of them
+are the result of engine bugs. For known issues related to the physics engine,
+see
+`open physics-related issues on GitHub <https://github.com/godotengine/godot/issues?q=is%3Aopen+is%3Aissue+label%3Atopic%3Aphysics>`__.
+Looking through `closed issues
+<https://github.com/godotengine/godot/issues?q=+is%3Aclosed+is%3Aissue+label%3Atopic%3Aphysics>`__
+can also help answer questions related to physics engine behavior.
+
+Objects are passing through each other at high speeds
+-----------------------------------------------------
+
+This is known as *tunneling*. Enabling **Continuous CD** in the RigidBody
+properties can sometimes resolve this issue. If this does not help, there are
+other solutions you can try:
+
+- Make your static collision shapes thicker. For example, if you have a thin
+  floor that the player can't get below in some way, you can make the collider
+  thicker than the floor's visual representation.
+- Modify your fast-moving object's collision shape depending on its movement
+  speed. The faster the object moves, the larger the collision shape should
+  extend outside of the object to ensure it can collide with thin walls more
+  reliably.
+- Increase **Physics Ticks Per Second** in the advanced Project Settings. While
+  this has other benefits (such as more stable simulation and reduced input
+  lag), this increases CPU utilization and may not be viable for mobile/web
+  platforms. Multipliers of the default value of ``60`` (such as ``120``, ``180``
+  or ``240``) should be preferred for a smooth appearance on most displays.
+
+Stacked objects are unstable and wobbly
+---------------------------------------
+
+Despite seeming like a simple problem, stable RigidBody simulation with stacked
+objects is difficult to implement in a physics engine. This is caused by
+integrating forces going against each other. The more stacked objects are
+present, the stronger the forces will be against each other. This eventually
+causes the simulation to become wobbly, making the objects unable to rest on top
+of each other without moving.
+
+Increasing the physics simulation rate can help alleviate this issue. To do so,
+increase **Physics Ticks Per Second** in the advanced Project Settings. Note
+that increases CPU utilization and may not be viable for mobile/web platforms.
+Multipliers of the default value of ``60`` (such as ``120``, ``180`` or ``240``)
+should be preferred for a smooth appearance on most displays.
+
+Scaled physics bodies or collision shapes do not collide correctly
+------------------------------------------------------------------
+
+Godot does not currently support scaling of physics bodies or collision shapes.
+As a workaround, change the collision shape's extents instead of changing its
+scale. If you want the visual representation's scale to change as well, change
+the scale of the underlying visual representation (Sprite2D, MeshInstance3D, …)
+and change the collision shape's extents separately. Make sure the collision
+shape is not a child of the visual representation in this case.
+
+Since resources are shared by default, you'll have to make the collision shape
+resource unique if you don't want the change to be applied to all nodes using
+the same collision shape resource in the scene. This can be done by calling
+``duplicate()`` in a script on the collision shape resource *before* changing
+its size.
+
+Thin objects are wobbly when resting on the floor
+-------------------------------------------------
+
+This can be due to one of two causes:
+
+- The floor's collision shape is too thin.
+- The RigidBody's collision shape is too thin.
+
+In the first case, this can be alleviated by making the floor's collision shape
+thicker. For example, if you have a thin floor that the player can't get below
+in some way, you can make the collider thicker than the floor's visual
+representation.
+
+In the second case, this can usually only be resolved by increasing the physics
+simulation rate (as making the shape thicker would cause a disconnect between
+the RigidBody's visual representation and its collision).
+
+In both cases, increasing the physics simulation rate can also help alleviate
+this issue. To do so, increase **Physics Ticks Per Second** in the advanced
+Project Settings. Note that this increases CPU utilization and may not be viable
+for mobile/web platforms. Multipliers of the default value of ``60`` (such as
+``120``, ``180`` or ``240``) should be preferred for a smooth appearance on most
+displays.
+
+Cylinder collision shapes are unstable
+--------------------------------------
+
+During the transition from Bullet to GodotPhysics in Godot 4, cylinder collision
+shapes had to be reimplemented from scratch. However, cylinder collision shapes
+are one of the most difficult shapes to support, which is why many other physics
+engines don't provide any support for them. There are several known bugs with
+cylinder collision shapes currently.
+
+We recommend using box or capsule collision shapes for characters for now. Boxes
+generally provide the best reliability, but have the downside of making the
+character take more space diagonally. Capsule collision shapes do not have this
+downside, but their shape can make precision platforming more difficult.
+
+VehicleBody simulation is unstable, especially at high speeds
+-------------------------------------------------------------
+
+When a physics body moves at a high speed, it travels a large distance between
+each physics step. For instance, when using the 1 unit = 1 meter convention in
+3D, a vehicle moving at 360 km/h will travel 100 units per second. With the
+default physics simulation rate of 60 Hz, the vehicle moves by ~1.67 units each
+physics tick. This means that small objects may be ignored entirely by the
+vehicle (due to tunneling), but also that the simulation has little data to work
+with in general at such a high speed.
+
+Fast-moving vehicles can benefit a lot from an increased physics simulation
+rate. To do so, increase **Physics Ticks Per Second** in the advanced Project
+Settings. Note that this increases CPU utilization and may not be viable for
+mobile/web platforms. Multipliers of the default value of ``60`` (such as
+``120``, ``180`` or ``240``) should be preferred for a smooth appearance on most
+displays.
+
+Collision results in bumps when an object moves across tiles
+------------------------------------------------------------
+
+This is a known issue in the physics engine caused by the object bumping on a
+shape's edges, even though that edge is covered by another shape. This can occur
+in both 2D and 3D.
+
+The best way to work around this issue is to create a "composite" collider. This
+means that instead of individual tiles having their collision, you create a
+single collision shape representing the collision for a group of tiles.
+Typically, you should split composite colliders on a per-island basis (which
+means each group of touching tiles gets its own collider).
+
+Using a composite collider can also improve physics simulation performance in
+certain cases. However, since the composite collision shape is much more
+complex, this may not be a net performance win in all cases.
+
+Framerate drops when an object touches another object
+-----------------------------------------------------
+
+This is likely due to one of the objects using a collision shape that is too
+complex. Convex collision shapes should use a number of shapes as low as
+possible for performance reasons. When relying on Godot's automatic generation,
+it's possible that you ended up with dozens if not hundreds of shapes created
+for a single convex shape collision resource.
+
+In some cases, replacing a convex collider with a couple of primitive collision
+shapes (box, sphere, or capsule) can deliver better performance.
+
+This issue can also occur with StaticBodies that use very detailed trimesh
+(concave) collisions. In this case, use a simplified representation of the level
+geometry as a collider. Not only this will improve physics simulation
+performance significantly, but this can also improve stability by letting you
+remove small fixtures and crevices from being considered by collision.
+
+Physics simulation is unreliable when far away from the world origin
+--------------------------------------------------------------------
+
+This is caused by floating-point precision errors, which become more pronounced
+as the physics simulation occurs further away from the world origin. This issue
+also affects rendering, which results in wobbly camera movement when far away
+from the world origin. See :ref:`doc_large_world_coordinates` for more
+information.

+ 3 - 2
tutorials/platform/android/android_plugin.rst

@@ -97,7 +97,7 @@ The instructions below assumes that you're using Android Studio.
 
 
         local=["local_dep1.aar", "local_dep2.aar"]
         local=["local_dep1.aar", "local_dep2.aar"]
         remote=["example.plugin.android:remote-dep1:0.0.1", "example.plugin.android:remote-dep2:0.0.1"]
         remote=["example.plugin.android:remote-dep1:0.0.1", "example.plugin.android:remote-dep2:0.0.1"]
-        custom_maven_repos=["http://repo.mycompany.com/maven2"]
+        custom_maven_repos=["https://repo.mycompany.com/maven2"]
 
 
     The ``config`` section and fields are required and defined as follow:
     The ``config`` section and fields are required and defined as follow:
 
 
@@ -125,8 +125,9 @@ Move the plugin configuration file (e.g: ``MyPlugin.gdap``) and, if any, its loc
 
 
 The Godot editor will automatically parse all ``.gdap`` files in the ``res://android/plugins`` directory and show a list of detected and toggleable plugins in the Android export presets window under the **Plugins** section.
 The Godot editor will automatically parse all ``.gdap`` files in the ``res://android/plugins`` directory and show a list of detected and toggleable plugins in the Android export presets window under the **Plugins** section.
 
 
-.. image:: img/android_export_preset_plugins_section.png
+In order to allow GDScript to communicate with your Java Singleton, you must annotate your function with ``@UsedByGodot``. The name called from GDScript must match the function name exactly. There is **no** coercing ``snake_case`` to ``camelCase``.
 
 
+.. image:: img/android_export_preset_plugins_section.png
 
 
 From your script::
 From your script::
 
 

+ 1 - 1
tutorials/platform/consoles.rst

@@ -66,7 +66,7 @@ your games to various consoles.
 
 
 Following is the list of providers:
 Following is the list of providers:
 
 
-- `Lone Wolf Technology <http://www.lonewolftechnology.com/>`_ offers
+- `Lone Wolf Technology <https://www.lonewolftechnology.com/>`_ offers
   Switch and PS4 porting and publishing of Godot games.
   Switch and PS4 porting and publishing of Godot games.
 - `Pineapple Works <https://pineapple.works/>`_ offers
 - `Pineapple Works <https://pineapple.works/>`_ offers
   Switch, Xbox One & Xbox Series X/S (GDK) porting and publishing of Godot games (GDScript/C#).
   Switch, Xbox One & Xbox Series X/S (GDK) porting and publishing of Godot games (GDScript/C#).

+ 2 - 2
tutorials/plugins/editor/making_plugins.rst

@@ -246,8 +246,8 @@ dialog. For that, change the ``custom_node.gd`` script to the following:
         {
         {
             // Initialization of the plugin goes here.
             // Initialization of the plugin goes here.
             // Add the new type with a name, a parent type, a script and an icon.
             // Add the new type with a name, a parent type, a script and an icon.
-            var script = GD.Load<Script>("MyButton.cs");
-            var texture = GD.Load<Texture2D>("icon.png");
+            var script = GD.Load<Script>("res://addons/my_custom_node/MyButton.cs");
+            var texture = GD.Load<Texture2D>("res://addons/my_custom_node/icon.png");
             AddCustomType("MyButton", "Button", script, texture);
             AddCustomType("MyButton", "Button", script, texture);
         }
         }
 
 

+ 5 - 8
tutorials/plugins/running_code_in_the_editor.rst

@@ -267,15 +267,12 @@ By default, the warning only updates when closing and reopening the scene.
                 update_configuration_warnings()
                 update_configuration_warnings()
 
 
 
 
-    func _get_configuration_warning():
-        var warning = ""
+    func _get_configuration_warnings():
+        var warning = []
         if title == "":
         if title == "":
-            warning += "Please set `title` to a non-empty value."
-        if description.size() >= 100:
-            # Add a blank line between each warning to distinguish them individually.
-            if warning != "":
-                warning += "\n"
-            warning += "`description` should be less than 100 characters long."
+            warning.append("Please set `title` to a non-empty value.")
+        if description.length() >= 100:
+            warning.append("`description` should be less than 100 characters long.")
 
 
         # Returning an empty string means "no warning".
         # Returning an empty string means "no warning".
         return warning
         return warning

+ 43 - 19
tutorials/rendering/multiple_resolutions.rst

@@ -50,6 +50,11 @@ handle scaling for different sizes and aspect ratios.
 
 
 Godot provides several useful tools to do this easily.
 Godot provides several useful tools to do this easily.
 
 
+.. seealso::
+
+    You can see how Godot's support for multiple resolutions works in action using the
+    `Multiple Resolutions and Aspect Ratios demo project <https://github.com/godotengine/godot-demo-projects/tree/master/gui/multiple_resolutions>`__.
+
 Base size
 Base size
 ---------
 ---------
 
 
@@ -69,6 +74,14 @@ that are different from this base size. Godot offers many ways to
 control how the viewport will be resized and stretched to different
 control how the viewport will be resized and stretched to different
 screen sizes.
 screen sizes.
 
 
+To configure the stretch base size at runtime from a script, use the
+``get_tree().root.content_scale_size`` property (see
+:ref:`Window.content_scale_size <class_Window_property_content_scale_size>`).
+Changing this value can indirectly change the size of 2D elements. However, to
+provide an user-accessible scaling option, using
+:ref:`doc_multiple_resolutions_stretch_scale` is recommended as it's easier to
+adjust.
+
 .. note::
 .. note::
 
 
    Godot follows a modern approach to multiple resolutions. The engine will
    Godot follows a modern approach to multiple resolutions. The engine will
@@ -153,6 +166,11 @@ demonstrate the effect of different stretch modes. A single sprite, also
 
 
    .. image:: img/stretch_viewport_expand.gif
    .. image:: img/stretch_viewport_expand.gif
 
 
+To configure the stretch mode at runtime from a script, use the
+``get_tree().root.content_scale_mode`` property (see
+:ref:`Window.content_scale_mode <class_Window_property_content_scale_mode>`
+and the :ref:`ContentScaleMode <enum_Window_ContentScaleMode>` enum).
+
 Stretch Aspect
 Stretch Aspect
 ^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^
 
 
@@ -230,30 +248,36 @@ to the region outside the blue frame you see in the 2D editor.
     To allow the user to choose their preferred screen orientation at run-time,
     To allow the user to choose their preferred screen orientation at run-time,
     remember to set **Display > Window > Handheld > Orientation** to ``sensor``.
     remember to set **Display > Window > Handheld > Orientation** to ``sensor``.
 
 
-Stretch Shrink
-^^^^^^^^^^^^^^
+To configure the stretch aspect at runtime from a script, use the
+``get_tree().root.content_scale_aspect`` property (see
+:ref:`Window.content_scale_aspect <class_Window_property_content_scale_aspect>`
+and the :ref:`ContentScaleAspect <enum_Window_ContentScaleAspect>` enum).
 
 
-The **Shrink** setting allows you to add an extra scaling factor on top of
-what the **Stretch** options above already provide. The default value of 1
-means that no scaling occurs.
+.. _doc_multiple_resolutions_stretch_scale:
 
 
-If, for example, you set **Shrink** to 4 and leave **Stretch Mode** on
-**Disabled**, each unit in your scene will correspond to 4×4 pixels on the
-screen.
+Stretch Scale
+^^^^^^^^^^^^^
 
 
-If **Stretch Mode** is set to something other than **Disabled**, the size of
-the root viewport is scaled down by the **Shrink** factor, and pixels
-in the output are scaled up by the same amount. This is rarely useful for
-2D games, but can be used to increase performance in 3D games
-by rendering them at a lower resolution.
+The **Scale** setting allows you to add an extra scaling factor on top of
+what the **Stretch** options above already provide. The default value of ``1.0``
+means that no additional scaling occurs.
 
 
-From scripts
-^^^^^^^^^^^^
+For example, if you set **Scale** to ``2.0`` and leave **Stretch Mode** on
+**Disabled**, each unit in your scene will correspond to 2×2 pixels on the
+screen. This is a good way to provide scaling options for non-game applications.
 
 
-To configure stretching at runtime from a script, use the
-``get_tree().root.content_scale_mode`` (see
-:ref:`Window.content_scale_mode <class_Window_property_content_scale_mode>`
-and the :ref:`ContentScaleMode <enum_Window_ContentScaleMode>` enum).
+If **Stretch Mode** is set to **canvas_items**, 2D elements will be scaled
+relative to the base window size, then multiplied by the **Scale** setting. This
+can be exposed to players to allow them to adjust the automatically determined
+scale to their liking, for better accessibility.
+
+If **Stretch Mode** is set to **viewport**, the viewport's resolution is divided
+by **Scale**. This makes pixels look larger and reduces rendering resolution
+(with a given window size), which can improve performance.
+
+To configure the stretch scale at runtime from a script, use the
+``get_tree().root.content_scale_factor`` property (see
+:ref:`Window.content_scale_factor <class_Window_property_content_scale_factor>`).
 
 
 Common use case scenarios
 Common use case scenarios
 -------------------------
 -------------------------

+ 33 - 33
tutorials/scripting/gdextension/gdextension_cpp_example.rst

@@ -37,7 +37,7 @@ of Godot. GDExtensions will not work in older versions of Godot (only Godot 4 an
     To use `GDExtension <https://godotengine.org/article/introducing-gd-extensions>`__
     To use `GDExtension <https://godotengine.org/article/introducing-gd-extensions>`__
     you need to use the ``4.0`` branch of godot-cpp,
     you need to use the ``4.0`` branch of godot-cpp,
     which is only compatible with Godot 4.0 and being used here as an example.
     which is only compatible with Godot 4.0 and being used here as an example.
-    The ``master`` branch is the development branch and is being updated 
+    The ``master`` branch is the development branch and is being updated
     regularly to work with godot's ``master`` branch.
     regularly to work with godot's ``master`` branch.
 
 
 If you are versioning your project using Git, it is recommended to add it as
 If you are versioning your project using Git, it is recommended to add it as
@@ -160,7 +160,7 @@ GDExtension node we'll be creating. We will name it ``gdexample.h``:
         GDCLASS(GDExample, Sprite2D)
         GDCLASS(GDExample, Sprite2D)
 
 
     private:
     private:
-        float time_passed;
+        double time_passed;
 
 
     protected:
     protected:
         static void _bind_methods();
         static void _bind_methods();
@@ -169,7 +169,7 @@ GDExtension node we'll be creating. We will name it ``gdexample.h``:
         GDExample();
         GDExample();
         ~GDExample();
         ~GDExample();
 
 
-        void _process(float delta);
+        void _process(double delta);
     };
     };
 
 
     }
     }
@@ -194,8 +194,8 @@ and destructor defined, but there are two other functions that will likely look
 familiar to some, and one new method.
 familiar to some, and one new method.
 
 
 The first is ``_bind_methods``, which is a static function that Godot will
 The first is ``_bind_methods``, which is a static function that Godot will
-call to find out which methods can be called and which properties it exposes. 
-The second is our ``_process`` function, which will work exactly the same 
+call to find out which methods can be called and which properties it exposes.
+The second is our ``_process`` function, which will work exactly the same
 as the ``_process`` function you're used to in GDScript.
 as the ``_process`` function you're used to in GDScript.
 
 
 Let's implement our functions by creating our ``gdexample.cpp`` file:
 Let's implement our functions by creating our ``gdexample.cpp`` file:
@@ -211,15 +211,15 @@ Let's implement our functions by creating our ``gdexample.cpp`` file:
     }
     }
 
 
     GDExample::GDExample() {
     GDExample::GDExample() {
-        // initialize any variables here
+        // Initialize any variables here.
         time_passed = 0.0;
         time_passed = 0.0;
     }
     }
 
 
     GDExample::~GDExample() {
     GDExample::~GDExample() {
-        // add your cleanup here
+        // Add your cleanup here.
     }
     }
 
 
-    void GDExample::_process(float delta) {
+    void GDExample::_process(double delta) {
         time_passed += delta;
         time_passed += delta;
 
 
         Vector2 new_position = Vector2(10.0 + (10.0 * sin(time_passed * 2.0)), 10.0 + (10.0 * cos(time_passed * 1.5)));
         Vector2 new_position = Vector2(10.0 + (10.0 * sin(time_passed * 2.0)), 10.0 + (10.0 * cos(time_passed * 1.5)));
@@ -286,9 +286,9 @@ initialize them, but you might have to set up more things depending on your
 needs. We call the function ``register_class`` for each of our classes in our library.
 needs. We call the function ``register_class`` for each of our classes in our library.
 
 
 The important function is the third function called ``example_library_init``.
 The important function is the third function called ``example_library_init``.
-We first call a function in our bindings library that creates an initilization object. 
-This object registrates the initialization and termination functions of the GDExtension. 
-Furthermore, it sets the level of initilization (core, servers, scene, editor, level). 
+We first call a function in our bindings library that creates an initilization object.
+This object registrates the initialization and termination functions of the GDExtension.
+Furthermore, it sets the level of initilization (core, servers, scene, editor, level).
 
 
 At last, we need the header file for the ``register_types.cpp`` named
 At last, we need the header file for the ``register_types.cpp`` named
 ``register_types.h``.
 ``register_types.h``.
@@ -319,7 +319,7 @@ build files in a subsequent tutorial.
     master, you may need to make small changes using it with older versions or
     master, you may need to make small changes using it with older versions or
     refer to the ``SConstruct`` file in the Godot 4.0 documentation.
     refer to the ``SConstruct`` file in the Godot 4.0 documentation.
 
 
-Once you've downloaded the ``SConstruct`` file, place it in your GDExtension folder 
+Once you've downloaded the ``SConstruct`` file, place it in your GDExtension folder
 structure alongside ``godot-cpp``, ``src`` and ``demo``, then run:
 structure alongside ``godot-cpp``, ``src`` and ``demo``, then run:
 
 
 .. code-block:: bash
 .. code-block:: bash
@@ -423,12 +423,12 @@ functions:
 
 
     ...
     ...
     private:
     private:
-        float time_passed;
-        float amplitude;
+        double time_passed;
+        double amplitude;
 
 
     public:
     public:
-        void set_amplitude(const float amplitude);
-        float get_amplitude() const;
+        void set_amplitude(const double amplitude);
+        double get_amplitude() const;
     ...
     ...
 
 
 In our ``gdexample.cpp`` file we need to make a number of changes, we will only
 In our ``gdexample.cpp`` file we need to make a number of changes, we will only
@@ -443,12 +443,12 @@ show the methods we end up changing, don't remove the lines we're omitting:
     }
     }
 
 
     void GDExample::GDExample() {
     void GDExample::GDExample() {
-        // initialize any variables here
+        // Initialize any variables here.
         time_passed = 0.0;
         time_passed = 0.0;
         amplitude = 10.0;
         amplitude = 10.0;
     }
     }
 
 
-    void GDExample::_process(float delta) {
+    void GDExample::_process(double delta) {
         time_passed += delta;
         time_passed += delta;
 
 
         Vector2 new_position = Vector2(
         Vector2 new_position = Vector2(
@@ -459,11 +459,11 @@ show the methods we end up changing, don't remove the lines we're omitting:
         set_position(new_position);
         set_position(new_position);
     }
     }
 
 
-    void GDExample::set_amplitude(const float p_amplitude) {
+    void GDExample::set_amplitude(const double p_amplitude) {
         amplitude = p_amplitude;
         amplitude = p_amplitude;
     }
     }
 
 
-    float GDExample::get_amplitude() const {
+    double GDExample::get_amplitude() const {
         return amplitude;
         return amplitude;
     }
     }
 
 
@@ -479,12 +479,12 @@ code:
 .. code-block:: C++
 .. code-block:: C++
 
 
     ...
     ...
-        float amplitude;
-        float speed;
+        double amplitude;
+        double speed;
     ...
     ...
-        void _process(float delta) override;
-        void set_speed(float p_speed);
-        float get_speed();
+        void _process(double delta) override;
+        void set_speed(double p_speed);
+        double get_speed();
     ...
     ...
 
 
 This requires a few more changes to our ``gdexample.cpp`` file, again we're only
 This requires a few more changes to our ``gdexample.cpp`` file, again we're only
@@ -505,7 +505,7 @@ showing the methods that have changed so don't remove anything we're omitting:
         speed = 1.0;
         speed = 1.0;
     }
     }
 
 
-    void GDExample::_process(float delta) {
+    void GDExample::_process(double delta) {
         time_passed += speed * delta;
         time_passed += speed * delta;
 
 
         Vector2 new_position = Vector2(
         Vector2 new_position = Vector2(
@@ -518,11 +518,11 @@ showing the methods that have changed so don't remove anything we're omitting:
 
 
     ...
     ...
 
 
-    void GDExample::set_speed(float p_speed) {
+    void GDExample::set_speed(double p_speed) {
         speed = p_speed;
         speed = p_speed;
     }
     }
 
 
-    float GDExample::get_speed() const {
+    double GDExample::get_speed() const {
         return speed;
         return speed;
     }
     }
 
 
@@ -533,7 +533,7 @@ The first two arguments are the minimum and maximum value and the third is the s
 
 
 .. note::
 .. note::
 
 
-    For simplicity, we've only used the hint_range of the property method. 
+    For simplicity, we've only used the hint_range of the property method.
     There are a lot more options to choose from. These can be used to
     There are a lot more options to choose from. These can be used to
     further configure how properties are displayed and set on the Godot side.
     further configure how properties are displayed and set on the Godot side.
 
 
@@ -563,9 +563,9 @@ In our ``gdexample.h`` header file, we need to define a new member ``time_emit``
 .. code-block:: C++
 .. code-block:: C++
 
 
     ...
     ...
-        float time_passed;
-        float time_emit;
-        float amplitude;
+        double time_passed;
+        double time_emit;
+        double amplitude;
     ...
     ...
 
 
 This time, the changes in ``gdexample.cpp`` are more elaborate. First,
 This time, the changes in ``gdexample.cpp`` are more elaborate. First,
@@ -592,7 +592,7 @@ Next, we'll need to change our ``_process`` method:
 
 
 .. code-block:: C++
 .. code-block:: C++
 
 
-    void GDExample::_process(float delta) {
+    void GDExample::_process(double delta) {
         time_passed += speed * delta;
         time_passed += speed * delta;
 
 
         Vector2 new_position = Vector2(
         Vector2 new_position = Vector2(

+ 6 - 6
tutorials/scripting/gdscript/gdscript_documentation_comments.rst

@@ -49,11 +49,11 @@ Tags
     ##
     ##
     ## A more detailed description of the script.
     ## A more detailed description of the script.
     ##
     ##
-    ## @tutorial:            http://the/tutorial1/url.com
-    ## @tutorial(Tutorial2): http://the/tutorial2/url.com
+    ## @tutorial:            https://the/tutorial1/url.com
+    ## @tutorial(Tutorial2): https://the/tutorial2/url.com
 
 
 .. warning:: If there is any space in between the tag name and colon, for example
 .. warning:: If there is any space in between the tag name and colon, for example
-             ``@tutorial  :``, it won't treated as a valid tag and will be ignored.
+             ``@tutorial  :``, it won't be treated as a valid tag and will be ignored.
 
 
 .. note:: When the description spans multiple lines, the preceding and trailing white
 .. note:: When the description spans multiple lines, the preceding and trailing white
           spaces will be stripped and joined with a single space. To preserve the line
           spaces will be stripped and joined with a single space. To preserve the line
@@ -94,8 +94,8 @@ Examples
     ## The description of the script, what it can do,
     ## The description of the script, what it can do,
     ## and any further detail.
     ## and any further detail.
     ##
     ##
-    ## @tutorial:            http://the/tutorial1/url.com
-    ## @tutorial(Tutorial2): http://the/tutorial2/url.com
+    ## @tutorial:            https://the/tutorial1/url.com
+    ## @tutorial(Tutorial2): https://the/tutorial2/url.com
 
 
     ## The description of the variable v1.
     ## The description of the variable v1.
     var v1
     var v1
@@ -140,7 +140,7 @@ Examples
     ## The same rules apply apply here. The documentation must
     ## The same rules apply apply here. The documentation must
     ## immediately precede the class definition.
     ## immediately precede the class definition.
     ##
     ##
-    ## @tutorial: http://the/tutorial/url.com
+    ## @tutorial: https://the/tutorial/url.com
     class Inner:
     class Inner:
 
 
         ## Inner class variable v4.
         ## Inner class variable v4.

+ 12 - 6
tutorials/shaders/advanced_postprocessing.rst

@@ -76,19 +76,25 @@ You can also use both options.
 Depth texture
 Depth texture
 -------------
 -------------
 
 
-To read from the depth texture, perform a texture lookup using ``texture()`` and
-the uniform variable ``DEPTH_TEXTURE``.
+To read from the depth texture, we first need to create a texture uniform set to the depth buffer
+by using ``hint_depth_texture``.
 
 
 .. code-block:: glsl
 .. code-block:: glsl
 
 
-  float depth = texture(DEPTH_TEXTURE, SCREEN_UV).x;
+  uniform sampler2D depth_texture : source_color, hint_depth_texture;
+
+Once defined, the depth texture can be read with the ``texture()`` function.
+
+.. code-block:: glsl
+
+  float depth = texture(depth_texture, SCREEN_UV).x;
 
 
 .. note:: Similar to accessing the screen texture, accessing the depth texture is only
 .. note:: Similar to accessing the screen texture, accessing the depth texture is only
           possible when reading from the current viewport. The depth texture cannot be
           possible when reading from the current viewport. The depth texture cannot be
           accessed from another viewport to which you have rendered.
           accessed from another viewport to which you have rendered.
 
 
-The values returned by ``DEPTH_TEXTURE`` are between ``0.0`` and ``1.0`` and are nonlinear.
-When displaying depth directly from the ``DEPTH_TEXTURE``, everything will look almost
+The values returned by ``depth_texture`` are between ``0.0`` and ``1.0`` and are nonlinear.
+When displaying depth directly from the ``depth_texture``, everything will look almost
 white unless it is very close. This is because the depth buffer stores objects closer
 white unless it is very close. This is because the depth buffer stores objects closer
 to the camera using more bits than those further, so most of the detail in depth
 to the camera using more bits than those further, so most of the detail in depth
 buffer is found close to the camera. In order to make the depth value align with world or
 buffer is found close to the camera. In order to make the depth value align with world or
@@ -111,7 +117,7 @@ the depth value for ``z``.
 .. code-block:: glsl
 .. code-block:: glsl
 
 
   void fragment() {
   void fragment() {
-    float depth = texture(DEPTH_TEXTURE, SCREEN_UV).x;
+    float depth = texture(depth_texture, SCREEN_UV).x;
     vec3 ndc = vec3(SCREEN_UV * 2.0 - 1.0, depth);
     vec3 ndc = vec3(SCREEN_UV * 2.0 - 1.0, depth);
   }
   }
 
 

+ 2 - 2
tutorials/shaders/shader_reference/particle_shader.rst

@@ -14,7 +14,7 @@ CanvasItem of Spatial shader. They contain two processor functions: ``start()``
 and ``process()``.
 and ``process()``.
 
 
 Unlike other shader types, particle shaders keep the data that was output the
 Unlike other shader types, particle shaders keep the data that was output the
-previous frame. Therefore, particle shaders ca be used for complex effects that
+previous frame. Therefore, particle shaders can be used for complex effects that
 take place over multiple frames.
 take place over multiple frames.
 
 
 .. note::
 .. note::
@@ -85,7 +85,7 @@ Start and Process built-ins
 +---------------------------------+--------------------------------------------------------------------------------+
 +---------------------------------+--------------------------------------------------------------------------------+
 | in uint **RANDOM_SEED**         | Random seed used as base for random.                                           |
 | in uint **RANDOM_SEED**         | Random seed used as base for random.                                           |
 +---------------------------------+--------------------------------------------------------------------------------+
 +---------------------------------+--------------------------------------------------------------------------------+
-| inout bool **ACTIVE**           | ``true`` when Particle is active, can be set ``false``.                        |
+| inout bool **ACTIVE**           | ``true`` when the particle is active, can be set ``false``.                    |
 +---------------------------------+--------------------------------------------------------------------------------+
 +---------------------------------+--------------------------------------------------------------------------------+
 | inout vec4 **COLOR**            | Particle color, can be written to and accessed in mesh's vertex function.      |
 | inout vec4 **COLOR**            | Particle color, can be written to and accessed in mesh's vertex function.      |
 +---------------------------------+--------------------------------------------------------------------------------+
 +---------------------------------+--------------------------------------------------------------------------------+

+ 89 - 80
tutorials/shaders/shader_reference/spatial_shader.rst

@@ -11,79 +11,79 @@ write vertex, fragment, and light processor functions to affect how objects are
 Render modes
 Render modes
 ^^^^^^^^^^^^
 ^^^^^^^^^^^^
 
 
-+-------------------------------+------------------------------------------------------------------------+
-| Render mode                   | Description                                                            |
-+===============================+========================================================================+
-| **blend_mix**                 | Mix blend mode (alpha is transparency), default.                       |
-+-------------------------------+------------------------------------------------------------------------+
-| **blend_add**                 | Additive blend mode.                                                   |
-+-------------------------------+------------------------------------------------------------------------+
-| **blend_sub**                 | Subtractive blend mode.                                                |
-+-------------------------------+------------------------------------------------------------------------+
-| **blend_mul**                 | Multiplicative blend mode.                                             |
-+-------------------------------+------------------------------------------------------------------------+
-| **depth_draw_opaque**         | Only draw depth for opaque geometry (not transparent).                 |
-+-------------------------------+------------------------------------------------------------------------+
-| **depth_draw_always**         | Always draw depth (opaque and transparent).                            |
-+-------------------------------+------------------------------------------------------------------------+
-| **depth_draw_never**          | Never draw depth.                                                      |
-+-------------------------------+------------------------------------------------------------------------+
-| **depth_prepass_alpha**       | Do opaque depth pre-pass for transparent geometry.                     |
-+-------------------------------+------------------------------------------------------------------------+
-| **depth_test_disabled**       | Disable depth testing.                                                 |
-+-------------------------------+------------------------------------------------------------------------+
-| **sss_mode_skin**             |                                                                        |
-+-------------------------------+------------------------------------------------------------------------+
-| **cull_back**                 | Cull back-faces (default).                                             |
-+-------------------------------+------------------------------------------------------------------------+
-| **cull_front**                | Cull front-faces.                                                      |
-+-------------------------------+------------------------------------------------------------------------+
-| **cull_disabled**             | Culling disabled (double sided).                                       |
-+-------------------------------+------------------------------------------------------------------------+
-| **unshaded**                  | Result is just albedo. No lighting/shading happens in material.        |
-+-------------------------------+------------------------------------------------------------------------+
-| **wireframe**                 | Geometry draws using lines.                                            |
-+-------------------------------+------------------------------------------------------------------------+
-| **diffuse_lambert**           | Lambert shading for diffuse (default).                                 |
-+-------------------------------+------------------------------------------------------------------------+
-| **diffuse_lambert_wrap**      | Lambert wrapping (roughness dependent) for diffuse.                    |
-+-------------------------------+------------------------------------------------------------------------+
-| **diffuse_burley**            | Burley (Disney PBS) for diffuse.                                       |
-+-------------------------------+------------------------------------------------------------------------+
-| **diffuse_toon**              | Toon shading for diffuse.                                              |
-+-------------------------------+------------------------------------------------------------------------+
-| **specular_schlick_ggx**      | Schlick-GGX for specular (default).                                    |
-+-------------------------------+------------------------------------------------------------------------+
-| **specular_blinn**            | Blinn for specular (compatibility).                                    |
-+-------------------------------+------------------------------------------------------------------------+
-| **specular_phong**            | Phong for specular (compatibility).                                    |
-+-------------------------------+------------------------------------------------------------------------+
-| **specular_toon**             | Toon for specular.                                                     |
-+-------------------------------+------------------------------------------------------------------------+
-| **specular_disabled**         | Disable specular.                                                      |
-+-------------------------------+------------------------------------------------------------------------+
-| **skip_vertex_transform**     | VERTEX/NORMAL/etc. need to be transformed manually in vertex function. |
-+-------------------------------+------------------------------------------------------------------------+
-| **world_vertex_coords**       | VERTEX/NORMAL/etc. are modified in world coordinates instead of local. |
-+-------------------------------+------------------------------------------------------------------------+
-| **ensure_correct_normals**    | Use when non-uniform scale is applied to mesh.                         |
-+-------------------------------+------------------------------------------------------------------------+
-| **shadows_disabled**          | Disable computing shadows in shader.                                   |
-+-------------------------------+------------------------------------------------------------------------+
-| **ambient_light_disabled**    | Disable contribution from ambient light and radiance map.              |
-+-------------------------------+------------------------------------------------------------------------+
-| **shadow_to_opacity**         | Lighting modifies the alpha so shadowed areas are opaque and           |
-|                               | non-shadowed areas are transparent. Useful for overlaying shadows onto |
-|                               | a camera feed in AR.                                                   |
-+-------------------------------+------------------------------------------------------------------------+
-| **vertex_lighting**           | Use vertex-based lighting.                                             |
-+-------------------------------+------------------------------------------------------------------------+
-| **particle_trails**           | Enables the trails when used on particles geometry.                    |
-+-------------------------------+------------------------------------------------------------------------+
-| **alpha_to_coverage**         |                                                                        |
-+-------------------------------+------------------------------------------------------------------------+
-| **alpha_to_coverage_and_one** |                                                                        |
-+-------------------------------+------------------------------------------------------------------------+
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| Render mode                   | Description                                                                                          |
++===============================+======================================================================================================+
+| **blend_mix**                 | Mix blend mode (alpha is transparency), default.                                                     |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **blend_add**                 | Additive blend mode.                                                                                 |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **blend_sub**                 | Subtractive blend mode.                                                                              |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **blend_mul**                 | Multiplicative blend mode.                                                                           |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **depth_draw_opaque**         | Only draw depth for opaque geometry (not transparent).                                               |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **depth_draw_always**         | Always draw depth (opaque and transparent).                                                          |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **depth_draw_never**          | Never draw depth.                                                                                    |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **depth_prepass_alpha**       | Do opaque depth pre-pass for transparent geometry.                                                   |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **depth_test_disabled**       | Disable depth testing.                                                                               |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **sss_mode_skin**             | Subsurface Scattering mode for skin.                                                                 |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **cull_back**                 | Cull back-faces (default).                                                                           |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **cull_front**                | Cull front-faces.                                                                                    |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **cull_disabled**             | Culling disabled (double sided).                                                                     |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **unshaded**                  | Result is just albedo. No lighting/shading happens in material.                                      |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **wireframe**                 | Geometry draws using lines.                                                                          |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **diffuse_lambert**           | Lambert shading for diffuse (default).                                                               |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **diffuse_lambert_wrap**      | Lambert wrapping (roughness dependent) for diffuse.                                                  |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **diffuse_burley**            | Burley (Disney PBS) for diffuse.                                                                     |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **diffuse_toon**              | Toon shading for diffuse.                                                                            |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **specular_schlick_ggx**      | Schlick-GGX for specular (default).                                                                  |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **specular_blinn**            | Blinn for specular (compatibility).                                                                  |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **specular_phong**            | Phong for specular (compatibility).                                                                  |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **specular_toon**             | Toon for specular.                                                                                   |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **specular_disabled**         | Disable specular.                                                                                    |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **skip_vertex_transform**     | VERTEX/NORMAL/etc. need to be transformed manually in vertex function.                               |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **world_vertex_coords**       | VERTEX/NORMAL/etc. are modified in world coordinates instead of local.                               |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **ensure_correct_normals**    | Use when non-uniform scale is applied to mesh.                                                       |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **shadows_disabled**          | Disable computing shadows in shader.                                                                 |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **ambient_light_disabled**    | Disable contribution from ambient light and radiance map.                                            |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **shadow_to_opacity**         | Lighting modifies the alpha so shadowed areas are opaque and                                         |
+|                               | non-shadowed areas are transparent. Useful for overlaying shadows onto                               |
+|                               | a camera feed in AR.                                                                                 |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **vertex_lighting**           | Use vertex-based lighting.                                                                           |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **particle_trails**           | Enables the trails when used on particles geometry.                                                  |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **alpha_to_coverage**         | Alpha antialiasing mode, see `here <https://github.com/godotengine/godot/pull/40364>`_ for more.     |
++-------------------------------+------------------------------------------------------------------------------------------------------+
+| **alpha_to_coverage_and_one** | Alpha antialiasing mode, see `here <https://github.com/godotengine/godot/pull/40364>`_ for more.     |
++-------------------------------+------------------------------------------------------------------------------------------------------+
 
 
 Built-ins
 Built-ins
 ^^^^^^^^^
 ^^^^^^^^^
@@ -178,11 +178,16 @@ shader, this value can be used as desired.
 +----------------------------------------+--------------------------------------------------------+
 +----------------------------------------+--------------------------------------------------------+
 | in vec4 **INSTANCE_CUSTOM**            | Instance custom data (for particles, mostly).          |
 | in vec4 **INSTANCE_CUSTOM**            | Instance custom data (for particles, mostly).          |
 +----------------------------------------+--------------------------------------------------------+
 +----------------------------------------+--------------------------------------------------------+
-| in int **VIEW_INDEX**                  |                                                        |
+| in int **VIEW_INDEX**                  | The view that we are rendering.                        |
+|                                        | ``VIEW_MONO_LEFT`` (``0``) for Mono (not multiview) or |
+|                                        | left eye, ``VIEW_RIGHT`` (``1``) for right eye.        |
 +----------------------------------------+--------------------------------------------------------+
 +----------------------------------------+--------------------------------------------------------+
-| in int **VIEW_MONO_LEFT**              |                                                        |
+| in int **VIEW_MONO_LEFT**              | Constant for Mono or left eye, always ``0``.           |
 +----------------------------------------+--------------------------------------------------------+
 +----------------------------------------+--------------------------------------------------------+
-| in int **VIEW_RIGHT**                  |                                                        |
+| in int **VIEW_RIGHT**                  | Constant for right eye, always ``1``.                  |
++----------------------------------------+--------------------------------------------------------+
+| in vec3 **EYE_OFFSET**                 | Position offset for the eye being rendered.            |
+|                                        | Only applicable for multiview rendering.               |
 +----------------------------------------+--------------------------------------------------------+
 +----------------------------------------+--------------------------------------------------------+
 | inout vec3 **VERTEX**                  | Vertex in local coordinates.                           |
 | inout vec3 **VERTEX**                  | Vertex in local coordinates.                           |
 +----------------------------------------+--------------------------------------------------------+
 +----------------------------------------+--------------------------------------------------------+
@@ -285,11 +290,15 @@ these properties, and if you don't write to them, Godot will optimize away the c
 +----------------------------------------+--------------------------------------------------------------------------------------------------+
 +----------------------------------------+--------------------------------------------------------------------------------------------------+
 | in vec3 **VERTEX**                     | Vertex that comes from vertex function (default, in view space).                                 |
 | in vec3 **VERTEX**                     | Vertex that comes from vertex function (default, in view space).                                 |
 +----------------------------------------+--------------------------------------------------------------------------------------------------+
 +----------------------------------------+--------------------------------------------------------------------------------------------------+
-| in int **VIEW_INDEX**                  |                                                                                                  |
+| in int **VIEW_INDEX**                  | The view that we are rendering.                                                                  |
+|                                        | ``VIEW_MONO_LEFT`` (``0``) for Mono (not multiview) or                                           |
+|                                        | left eye, ``VIEW_RIGHT`` (``1``) for right eye.                                                  |
++----------------------------------------+--------------------------------------------------------------------------------------------------+
+| in int **VIEW_MONO_LEFT**              | Constant for Mono or left eye, always ``0``.                                                     |
 +----------------------------------------+--------------------------------------------------------------------------------------------------+
 +----------------------------------------+--------------------------------------------------------------------------------------------------+
-| in int **VIEW_MONO_LEFT**              |                                                                                                  |
+| in int **VIEW_RIGHT**                  | Constant for right eye, always ``1``.                                                            |
 +----------------------------------------+--------------------------------------------------------------------------------------------------+
 +----------------------------------------+--------------------------------------------------------------------------------------------------+
-| in int **VIEW_RIGHT**                  |                                                                                                  |
+| in vec3 **EYE_OFFSET**                 | Position offset for the eye being rendered. Only applicable for multiview rendering.             |
 +----------------------------------------+--------------------------------------------------------------------------------------------------+
 +----------------------------------------+--------------------------------------------------------------------------------------------------+
 | sampler2D **SCREEN_TEXTURE**           | Removed in Godot 4. Use a ``sampler2D`` with ``hint_screen_texture`` instead.                    |
 | sampler2D **SCREEN_TEXTURE**           | Removed in Godot 4. Use a ``sampler2D`` with ``hint_screen_texture`` instead.                    |
 +----------------------------------------+--------------------------------------------------------------------------------------------------+
 +----------------------------------------+--------------------------------------------------------------------------------------------------+
@@ -464,7 +473,7 @@ If you want the lights to add together, add the light contribution to ``DIFFUSE_
     for more information and ways to avoid issues.
     for more information and ways to avoid issues.
 
 
     Transparent materials also cannot cast shadows or appear in
     Transparent materials also cannot cast shadows or appear in
-    ``SCREEN_TEXTURE`` and ``DEPTH_TEXTURE``. This in turn prevents those
+    ``hint_screen_texture`` and ``hint_depth_texture`` uniforms. This in turn prevents those
     materials from appearing in screen-space reflections or refraction.
     materials from appearing in screen-space reflections or refraction.
     :ref:`SDFGI <doc_using_sdfgi>` sharp reflections are not visible on transparent
     :ref:`SDFGI <doc_using_sdfgi>` sharp reflections are not visible on transparent
     materials (only rough reflections are visible on transparent materials).
     materials (only rough reflections are visible on transparent materials).

+ 1 - 1
tutorials/ui/bbcode_in_richtextlabel.rst

@@ -277,7 +277,7 @@ Reference
     - ``[right]{text}[/right]``
     - ``[right]{text}[/right]``
 
 
   * - | **fill**
   * - | **fill**
-      | Makes ``{text}`` fill the the full width of ``RichTextLabel``.
+      | Makes ``{text}`` fill the full width of ``RichTextLabel``.
       | Same as ``[p align=fill]``.
       | Same as ``[p align=fill]``.
 
 
     - ``[fill]{text}[/fill]``
     - ``[fill]{text}[/fill]``

+ 15 - 11
tutorials/xr/deploying_to_android.rst

@@ -9,8 +9,8 @@ Most mobile headsets run on Android and OpenXR support is making its way to thes
 For general requirements around exporting to Android, please first read :ref:`doc_exporting_for_android`.
 For general requirements around exporting to Android, please first read :ref:`doc_exporting_for_android`.
 
 
 .. note::
 .. note::
-	Official support for the Android platform wasn't added to the OpenXR specification initially resulting in various vendors creating custom loaders to make OpenXR available on their headsets.
-	While the long term expectation is that all vendors will adopt the official OpenXR loader, for now these loaders need to be added to your project.
+    Official support for the Android platform wasn't added to the OpenXR specification initially resulting in various vendors creating custom loaders to make OpenXR available on their headsets.
+    While the long term expectation is that all vendors will adopt the official OpenXR loader, for now these loaders need to be added to your project.
 
 
 Custom Android build
 Custom Android build
 --------------------
 --------------------
@@ -26,14 +26,14 @@ You can read more about custom builds here: :ref:`doc_android_custom_build`.
 
 
 Installing the loader plugins
 Installing the loader plugins
 -----------------------------
 -----------------------------
-Inside the **android** folder you will find a subfolder called **plugins**, we will need to install our loader plugins into this folder.
+The loaders can be downloaded from the asset library, search for OpenXR Loaders and install the plugin:
 
 
-.. note::
-	Once an official release becomes available you will be able to install this plugin through the asset library. For now this is a manual install.
+.. image:: img/openxr_loader_asset_lib.webp
 
 
-You can find the loader plugin `here <https://github.com/GodotVR/godot_openxr_loaders/releases>`__.
+You will find the installed files inside the **android** folder.
+There is a subfolder called **plugins** containing the new files.
 
 
-Download the **godotopenxrloaders.zip** file for the release marked as **Latest**. From this zip file copy the files found in **asset/android/plugins** into the **android/plugins** folder of your project.
+You can find the main repository of the loader plugin `here <https://github.com/GodotVR/godot_openxr_loaders>`__.
 
 
 Creating the export templates
 Creating the export templates
 -----------------------------
 -----------------------------
@@ -42,7 +42,7 @@ You will need to setup a separate export template for each device as each device
 Open **Project** and select **Export..**.
 Open **Project** and select **Export..**.
 Click on **Add..** and select **Android**.
 Click on **Add..** and select **Android**.
 Next change the name of the export profile for the device you're setting this up for, say **Meta Quest**.
 Next change the name of the export profile for the device you're setting this up for, say **Meta Quest**.
-And enable **Use Custom Build**.
+And enable **Use Gradle Build**.
 
 
 If the loader plugins were installed correctly you should find entries for the different headsets, select the entry for meta:
 If the loader plugins were installed correctly you should find entries for the different headsets, select the entry for meta:
 
 
@@ -59,10 +59,14 @@ The hand tracking and passthrough settings here currently only work for the Meta
 Now you can repeat the same process for the other devices. Note that if you wish to test your game with Godots one-click deploy, you have to mark the export profile for your device as **Runnable** so Godot knows which loader to deploy.
 Now you can repeat the same process for the other devices. Note that if you wish to test your game with Godots one-click deploy, you have to mark the export profile for your device as **Runnable** so Godot knows which loader to deploy.
 
 
 .. note::
 .. note::
-	Currently only Meta Quest and PICO are supported. Other loaders will be added as soon as possible.
+    There are separate loaders for the Meta Quest, Pico and Lynx R1 headsets.
+
+    The fourth option is the official Khronos (KHR) loader, in due time all headsets should work with this loader.
+    At the moment this loader has been tested with the Magic Leap 2 and standalone HTC headsets.
 
 
 .. warning::
 .. warning::
-	While the Mobile Vulkan renderer has many optimizations targeted at mobile devices, we're still working out the kinks. It is highly advisable to use the OpenGL renderer for the time being when targeting Android based XR devices.
+    While the Mobile Vulkan renderer has many optimizations targeted at mobile devices, we're still working out the kinks.
+    It is highly advisable to use the OpenGL renderer for the time being when targeting Android based XR devices.
 
 
-	Note that we are awaiting a driver update on the PICO before Vulkan support will work on PICO devices.
+    Note that we are awaiting driver updates on various devices before Vulkan support will work on these.
 
 

二進制
tutorials/xr/img/android_meta_quest.webp


二進制
tutorials/xr/img/openxr_loader_asset_lib.webp


+ 2 - 2
tutorials/xr/xr_action_map.rst

@@ -330,11 +330,11 @@ Let's finish our configuration:
 
 
 .. image:: img/xr_touch_completed.webp
 .. image:: img/xr_touch_completed.webp
 
 
-Each action is bound the the given input or output for both controllers to indicate that we support the action on either controller.
+Each action is bound the given input or output for both controllers to indicate that we support the action on either controller.
 The exception is the movement action which is bound only to the right hand controller.
 The exception is the movement action which is bound only to the right hand controller.
 It is likely that we would want to use the left hand thumbstick for a different purpose, say a teleport function.
 It is likely that we would want to use the left hand thumbstick for a different purpose, say a teleport function.
 
 
-In developing your game/application you have to account for the possibility that the user changes the binding and binds the movement to the left hand thumbstick. 
+In developing your game/application you have to account for the possibility that the user changes the binding and binds the movement to the left hand thumbstick.
 
 
 Also note that our shoot and grab boolean actions are linked to inputs of type ``Float``.
 Also note that our shoot and grab boolean actions are linked to inputs of type ``Float``.
 As mentioned before OpenXR will do conversions between the two, but do read the warning given on that subject earlier in this document.
 As mentioned before OpenXR will do conversions between the two, but do read the warning given on that subject earlier in this document.