浏览代码

Add links to demo projects where relevant (#6874)

* Add links to demo projects where relevant

- Warn about poor compute shader support on mobile GPUs (due to driver bugs).
- Update control gallery image for 4.0.
- Fix typo in Internationalizing games.

---------

Co-authored-by: Max Hilbrunner <[email protected]>
Hugo Locurcio 2 年之前
父节点
当前提交
3dfbfbf381

二进制
img/control_gallery.webp


+ 5 - 0
tutorials/3d/3d_antialiasing.rst

@@ -33,6 +33,11 @@ and thin lines on top of the box have almost disappeared:
 To combat this, various antialiasing techniques can be used in Godot. These are
 detailed below.
 
+.. seealso::
+
+    You can compare antialiasing algorithms in action using the
+    `3D Antialiasing demo project <https://github.com/godotengine/godot-demo-projects/tree/master/3d/antialiasing>`__.
+
 Multisample antialiasing (MSAA)
 -------------------------------
 

+ 3 - 0
tutorials/3d/3d_text.rst

@@ -16,6 +16,9 @@ Additionally, Godot makes it possible to position Control nodes according to a
 
 .. seealso::
 
+    You can see 3D text in action using the
+    `3D Labels and Texts demo project <https://github.com/godotengine/godot-demo-projects/tree/master/3d/labels_and_texts>`__.
+
     This page does **not** cover how to display a GUI scene within a 3D
     environment. For information on how to achieve that, see the
     `GUI in 3D <https://github.com/godotengine/godot-demo-projects/tree/master/viewport/gui_in_3d>`__

+ 5 - 0
tutorials/3d/csg_tools.rst

@@ -25,6 +25,11 @@ Interior environments can be created by using inverted primitives.
 
 .. image:: img/csg.gif
 
+.. seealso::
+
+    You can check how to use CSG nodes to build various shapes (such as stairs or roads) using the
+    `Constructive Solid Geometry demo project <https://github.com/godotengine/godot-demo-projects/tree/master/3d/csg>`__.
+
 Introduction to CSG nodes
 -------------------------
 

+ 5 - 0
tutorials/3d/global_illumination/introduction_to_global_illumination.rst

@@ -340,6 +340,11 @@ If you are unsure about which GI technique to use:
   :ref:`ReflectionProbes <doc_reflection_probes>` are the only supported options.
   See also :ref:`doc_introduction_to_global_illumination_alternatives`.
 
+.. seealso::
+
+    You can compare global illumination techniques in action using the
+    `Global Illumination demo project <https://github.com/godotengine/godot-demo-projects/tree/master/3d/global_illumination>`__.
+
 .. _doc_introduction_to_global_illumination_gi_mode_recommendations:
 
 Which global illumination mode should I use on meshes and lights?

+ 5 - 0
tutorials/3d/lights_and_shadows.rst

@@ -20,6 +20,11 @@ result. Light can come from several types of sources in a scene:
 The emission color is a material property. You can read more about it
 in the :ref:`doc_standard_material_3d` tutorial.
 
+.. seealso::
+
+    You can compare various types of lights in action using the
+    `3D Lights and Shadows demo project <https://github.com/godotengine/godot-demo-projects/tree/master/3d/lights_and_shadows>`__.
+
 Light nodes
 -----------
 

+ 5 - 0
tutorials/3d/mesh_lod.rst

@@ -13,6 +13,11 @@ On this page, you'll learn:
 - How to measure mesh LOD's effectiveness in your project
   (and alternatives you can explore if it doesn't meet your expectations).
 
+.. seealso::
+
+    You can see how mesh LOD works in action using the
+    `Occlusion Culling and Mesh LOD demo project <https://github.com/godotengine/godot-demo-projects/tree/master/3d/occlusion_culling_mesh_lod>`__.
+
 Introduction
 ------------
 

+ 5 - 0
tutorials/3d/occlusion_culling.rst

@@ -12,6 +12,11 @@ On this page, you'll learn:
 - How to set up occlusion culling in Godot.
 - Troubleshooting common issues with occlusion culling.
 
+.. seealso::
+
+    You can see how occlusion culling works in action using the
+    `Occlusion Culling and Mesh LOD demo project <https://github.com/godotengine/godot-demo-projects/tree/master/3d/occlusion_culling_mesh_lod>`__.
+
 Why use occlusion culling
 -------------------------
 

+ 5 - 0
tutorials/3d/resolution_scaling.rst

@@ -20,6 +20,11 @@ scaling is not intended to be a replacement for decreasing graphics settings on
 lower-end hardware. Consider exposing both resolution scale and graphics
 settings in your in-game menus.
 
+.. seealso::
+
+    You can compare resolution scaling modes and factors in action using the
+    `3D Antialiasing demo project <https://github.com/godotengine/godot-demo-projects/tree/master/3d/antialiasing>`__.
+
 .. note::
 
     Resolution scaling is currently not available for 2D rendering, but it can be

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

@@ -22,8 +22,8 @@ On this page, you'll learn:
 
 .. seealso::
 
-    The Godot demo projects repository contains a
-    `volumetric fog demo <https://github.com/godotengine/godot-demo-projects/tree/master/3d/volumetric_fog>`__.
+    You can see how volumetric fog works in action using the
+    `Volumetric Fog demo project <https://github.com/godotengine/godot-demo-projects/tree/master/3d/volumetric_fog>`__.
 
 Here is a comparison between traditional fog (which does not interact with lighting)
 and volumetric fog, which is able to interact with lighting:

+ 6 - 1
tutorials/i18n/internationalizing_games.rst

@@ -226,7 +226,7 @@ For RTL languages, Godot will automatically do the following changes to the UI:
 -  Swaps left and right text alignment.
 -  Mirrors horizontal order of the child controls in the containers, and items in Tree/ItemList controls.
 -  Uses mirrored order of the internal control elements (e.g. OptionButton dropdown button, checkbox alignment, List column order, Tree item icons and connecting line alignment, e.t.c.), in some cases mirrored controls use separate theme styles.
--  Coordinate system is not mirrored, and non-UI nodes (sprites, e.t.c) are not affected.x
+-  Coordinate system is not mirrored, and non-UI nodes (sprites, e.t.c) are not affected.
 
 It is possible to override text and control layout direction by using the following control properties:
 
@@ -237,6 +237,11 @@ It is possible to override text and control layout direction by using the follow
 
 .. image:: img/ui_mirror.png
 
+.. seealso::
+
+    You can see how right-to-left typesetting works in action using the
+    `BiDI and Font Features demo project <https://github.com/godotengine/godot-demo-projects/tree/master/gui/bidi_and_font_features>`__.
+
 Adding break iterator data to exported project
 ----------------------------------------------
 

+ 8 - 7
tutorials/i18n/pseudolocalization.rst

@@ -15,9 +15,10 @@ when it comes to locale changes. Pseudolocalization simulates changes that
 might take place during localization. This way, any issues regarding
 internationalization can be recognized early on during development.
 
-.. note:: The official demo for pseudolocalization can be used to play around with 
-          the various properties and observe their effects. You can
-          `download it from the godot-demo-projects GitHub repository <https://github.com/godotengine/godot-demo-projects/tree/master/gui/pseudolocalization>`_.
+.. seealso::
+
+    You can see how pseudolocalization works in action using the
+    `Pseudolocalizaton demo project <https://github.com/godotengine/godot-demo-projects/tree/master/gui/pseudolocalization>`__.
 
 Enabling and configuring pseudolocalization
 -------------------------------------------
@@ -34,8 +35,8 @@ Pseudolocalization can also be :ref:`toggled at runtime from a script <doc_pseud
 Pseudolocalization configurations
 ---------------------------------
 
-Pseudolocalization in Godot can be set up according to the specific use case of the 
-project. Here are the pseudolocalization properties that can be configured through 
+Pseudolocalization in Godot can be set up according to the specific use case of the
+project. Here are the pseudolocalization properties that can be configured through
 project settings:
 
 - ``replace_with_accents``: Replaces all characters in the string with their accented
@@ -71,12 +72,12 @@ Configuring pseudolocalization at runtime
 Pseudolocalization can be toggled at runtime using the
 :ref:`pseudolocalization_enabled<class_TranslationServer_property_pseudolocalization_enabled>` property
 in TranslationServer.
-However, if runtime configuration of pseudolocalization properties is required, 
+However, if runtime configuration of pseudolocalization properties is required,
 they can be directly configured using
 :ref:`ProjectSettings.set_setting(property, value) <class_ProjectSettings_method_set_setting>`
 and then calling
 :ref:`TranslationServer.reload_pseudolocalization() <class_TranslationServer_method_reload_pseudolocalization>`
-which reparses the pseudolocalization properties and reloads the pseudolocalization. 
+which reparses the pseudolocalization properties and reloads the pseudolocalization.
 The following code snippet shall turn on ``replace_with_accents`` and ``double_vowels`` properties
 and then call ``reload_pseudolocalization()`` for the changes to get reflected::
 

+ 5 - 0
tutorials/io/saving_games.rst

@@ -17,6 +17,11 @@ scale as the game grows more complex.
     If you're looking to save user configuration, you can use the
     :ref:`class_ConfigFile` class for this purpose.
 
+.. seealso::
+
+    You can see how saving and loading works in action using the
+    `Saving and Loading (Serialization) demo project <https://github.com/godotengine/godot-demo-projects/blob/master/loading/serialization>`__.
+
 Identify persistent objects
 ---------------------------
 

+ 7 - 0
tutorials/navigation/navigation_introduction_2d.rst

@@ -61,6 +61,13 @@ The 2D navigationm eshes are defined with the following resources:
     - The NavigationServer2D uses this resource to update navmesh of individual regions.
     - The TileSet Editor creates and uses this resource internally when defining tile navigation areas.
 
+.. seealso::
+
+    You can see how 2D navigation works in action using the
+    `2D Navigation Polygon <https://github.com/godotengine/godot-demo-projects/tree/master/2d/navigation>`__
+    and `Grid-based Navigation with AStarGrid2D <https://github.com/godotengine/godot-demo-projects/tree/master/2d/navigation_astar>`__
+    demo projects.
+
 Setup for 2D scene
 ------------------
 

+ 5 - 1
tutorials/navigation/navigation_introduction_3d.rst

@@ -1,6 +1,5 @@
 .. _doc_navigation_overview_3d:
 
-
 3D Navigation Overview
 ======================
 
@@ -66,6 +65,11 @@ The 3D navigation meshes are defined with the following resources:
     - The NavigationServer3D uses this resource to update navmesh of individual regions.
     - The GridMap Editor uses this resource when specific navigation meshes are defined for each gridcell.
 
+.. seealso::
+
+    You can see how 3D navigation works in action using the
+    `3D Navigation demo project <https://github.com/godotengine/godot-demo-projects/tree/master/3d/navigation>`__.
+
 Setup for 3D scene
 ------------------
 

+ 5 - 0
tutorials/performance/using_servers.rst

@@ -25,6 +25,11 @@ back to a more handcrafted, low level implementation of game code.
 
 Still, Godot is designed to work around this problem.
 
+.. seealso::
+
+    You can see how using low-level servers works in action using the
+    `Bullet Shower demo project <https://github.com/godotengine/godot-demo-projects/tree/master/2d/bullet_shower>`__
+
 Servers
 -------
 

+ 18 - 5
tutorials/shaders/compute_shaders.rst

@@ -17,16 +17,17 @@ A compute shader is a special type of shader program that is orientated towards
 general purpose programming. In other words, they are more flexible than vertex
 shaders and fragment shaders as they don't have a fixed purpose (i.e.
 transforming vertices or writing colors to an image). Unlike fragment shaders
-and vertex shaders, compute shaders have very little going on behind the scenes. The code you write is what the GPU runs and very little else. This can make them
+and vertex shaders, compute shaders have very little going on behind the scenes.
+The code you write is what the GPU runs and very little else. This can make them
 a very useful tool to offload heavy calculations to the GPU.
 
 Now let's get started by creating a short compute shader.
 
 First, in the **external** text editor of your choice, create a new file called
-``compute_example.glsl`` in your project folder. When you write compute shaders in Godot, you write them
-in GLSL directly. The Godot shader language is based on GLSL. If you are
-familiar with normal shaders in Godot, the syntax below will look somewhat
-familiar.
+``compute_example.glsl`` in your project folder. When you write compute shaders
+in Godot, you write them in GLSL directly. The Godot shader language is based on
+GLSL. If you are familiar with normal shaders in Godot, the syntax below will
+look somewhat familiar.
 
 .. note::
 
@@ -35,6 +36,9 @@ familiar.
    you are using the Forward+ or Mobile renderer. The setting for which is
    located in the top right-hand corner of the editor.
 
+   Note that compute shader support is generally poor on mobile devices (due to
+   driver bugs), even if they are technically supported.
+
 Let's take a look at this compute shader code:
 
 .. code-block:: glsl
@@ -345,3 +349,12 @@ the data and print the results to our console.
 
 With that, you have everything you need to get started working with compute
 shaders.
+
+.. seealso::
+
+   The demo projects repository contains a
+   `Compute Shader Heightmap demo <https://github.com/godotengine/godot-demo-projects/tree/master/misc/compute_shader_heightmap>`__
+   This project performs heightmap image generation on the CPU and
+   GPU separately, which lets you compare how a similar algorithm can be
+   implemented in two different ways (with the GPU implementation being faster
+   in most cases).

+ 1 - 1
tutorials/ui/control_node_gallery.rst

@@ -5,7 +5,7 @@ Control node gallery
 
 Here is a list of common Control nodes with their name next to them:
 
-.. image:: /img/control_gallery.png
+.. image:: /img/control_gallery.webp
 
 The Control Gallery demo pictured above can be found
 `on GitHub <https://github.com/godotengine/godot-demo-projects/tree/master/gui/control_gallery>`__.

+ 5 - 0
tutorials/ui/gui_using_fonts.rst

@@ -37,6 +37,11 @@ as *ligatures* (several characters transforming into a single different design).
     Fonts are covered by copyright. Double-check the license of a font before
     using it, as not all fonts allow commercial use without purchasing a license.
 
+.. seealso::
+
+    You can see how fonts work in action using the
+    `BiDI and Font Features demo project <https://github.com/godotengine/godot-demo-projects/tree/master/gui/bidi_and_font_features>`__.
+
 Dynamic fonts
 -------------