mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
Standardize RST header syntax
This commit is contained in:
@@ -39,7 +39,7 @@ required:
|
||||
.. _doc_compiling_for_linuxbsd_oneliners:
|
||||
|
||||
Distro-specific one-liners
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. tabs::
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ More details about this directory in
|
||||
:ref:`Data directory<compiling_with_dotnet_data_directory>`.
|
||||
|
||||
Build Platform
|
||||
^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
Provide the ``--godot-platform=<platform>`` argument to control for which
|
||||
platform specific the libraries are built. Omit this argument to build for the
|
||||
@@ -93,7 +93,7 @@ This currently only controls the inclusion of the support for Visual Studio as
|
||||
an external editor, the libraries are otherwise identical.
|
||||
|
||||
NuGet packages
|
||||
^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
The API assemblies, source generators, and custom MSBuild project SDK are
|
||||
distributed as NuGet packages. This is all transparent to the user, but it can
|
||||
@@ -130,7 +130,7 @@ cache. It's recommended to always use this option when building the C# solutions
|
||||
during development to avoid mistakes.
|
||||
|
||||
Building without depending on deprecated features (NO_DEPRECATED)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
When building Godot without deprecated classes and functions, i.e. the ``deprecated=no``
|
||||
argument for scons, the managed libraries must also be built without dependencies to deprecated code.
|
||||
@@ -140,7 +140,7 @@ This is done by passing the ``--no-deprecated`` argument:
|
||||
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir ./bin --push-nupkgs-local <my_local_source> --no-deprecated
|
||||
|
||||
Double Precision Support (REAL_T_IS_DOUBLE)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
When building Godot with double precision support, i.e. the ``precision=double``
|
||||
argument for scons, the managed libraries must be adjusted to match by passing
|
||||
@@ -154,7 +154,7 @@ Examples
|
||||
--------
|
||||
|
||||
Example (Windows)
|
||||
^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
::
|
||||
|
||||
@@ -171,7 +171,7 @@ Example (Windows)
|
||||
|
||||
|
||||
Example (Linux, \*BSD)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
::
|
||||
|
||||
@@ -196,7 +196,7 @@ enabled. It contains important files for the correct functioning of Godot. It
|
||||
must be distributed together with the Godot executable.
|
||||
|
||||
Editor
|
||||
^^^^^^
|
||||
~~~~~~
|
||||
|
||||
The name of the data directory for the Godot editor will always be
|
||||
``GodotSharp``. This directory contains an ``Api`` subdirectory with the Godot
|
||||
@@ -208,7 +208,7 @@ directory may be placed in the ``<bundle_name>.app/Contents/Resources/``
|
||||
directory inside the bundle.
|
||||
|
||||
Export templates
|
||||
^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
The data directory for exported projects is generated by the editor during the
|
||||
export. It is named ``data_<APPNAME>_<ARCH>``, where ``<APPNAME>`` is the
|
||||
|
||||
@@ -271,7 +271,7 @@ Optimizing the distribution of your project
|
||||
-------------------------------------------
|
||||
|
||||
Desktop
|
||||
^^^^^^^
|
||||
~~~~~~~
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -303,7 +303,7 @@ command:
|
||||
7z a -mx9 my_project.zip folder_containing_executable_and_pck
|
||||
|
||||
Web
|
||||
^^^
|
||||
~~~
|
||||
|
||||
Enabling gzip or Brotli compression for all file types from the web export
|
||||
(especially the ``.wasm`` and ``.pck``) can reduce the download size
|
||||
|
||||
@@ -63,7 +63,7 @@ knowledge of the platform's SDKs. Depending on what features you need, the
|
||||
amount of work needed varies:
|
||||
|
||||
Required features of a platform port
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
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.
|
||||
@@ -109,7 +109,7 @@ All methods should be implemented within ``detect.py`` as follows:
|
||||
options depending on SCons options chosen.
|
||||
|
||||
Optional features of a platform port
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
In practice, headless operation doesn't suffice if you want to see anything on
|
||||
screen and handle input devices. You may also want audio output for most
|
||||
|
||||
@@ -32,7 +32,7 @@ Rendering methods
|
||||
-----------------
|
||||
|
||||
Forward+
|
||||
^^^^^^^^
|
||||
~~~~~~~~
|
||||
|
||||
This is a forward renderer that uses a *clustered* approach to lighting.
|
||||
|
||||
@@ -45,7 +45,7 @@ This approach can greatly speed up rendering performance on desktop hardware,
|
||||
but is substantially less efficient on mobile.
|
||||
|
||||
Mobile
|
||||
^^^^^^
|
||||
~~~~~~
|
||||
|
||||
This is a forward renderer that uses a traditional single-pass approach to lighting.
|
||||
Internally, it is called **Forward Mobile**.
|
||||
@@ -104,7 +104,7 @@ post-processing effects are also not available.
|
||||
.. _doc_internal_rendering_architecture_compatibility:
|
||||
|
||||
Compatibility
|
||||
^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -139,7 +139,7 @@ rendering features (even less so compared to Mobile). Most
|
||||
post-processing effects are not available.
|
||||
|
||||
Why not deferred rendering?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Forward rendering generally provides a better tradeoff for performance versus
|
||||
flexibility, especially when a clustered approach to lighting is used. While
|
||||
@@ -161,7 +161,7 @@ Rendering drivers
|
||||
Godot 4 supports the following graphics APIs:
|
||||
|
||||
Vulkan
|
||||
^^^^^^
|
||||
~~~~~~
|
||||
|
||||
This is the main driver in Godot 4, with most of the development focus going
|
||||
towards this driver.
|
||||
@@ -185,7 +185,7 @@ Vulkan driver.
|
||||
- `drivers/d3d12/d3d12_context.cpp <https://github.com/godotengine/godot/blob/master/drivers/d3d12/d3d12_context.cpp>`__
|
||||
|
||||
Direct3D 12
|
||||
^^^^^^^^^^^
|
||||
~~~~~~~~~~~
|
||||
|
||||
Like Vulkan, the Direct3D 12 driver targets modern platforms only. It is
|
||||
designed to target both Windows and Xbox (whereas Vulkan can't be used directly on Xbox).
|
||||
@@ -206,7 +206,7 @@ See the `pull request that introduced Direct3D 12 support <https://github.com/go
|
||||
for more information.
|
||||
|
||||
Metal
|
||||
^^^^^
|
||||
~~~~~
|
||||
|
||||
Godot supports Metal rendering via `MoltenVK <https://github.com/KhronosGroup/MoltenVK>`__,
|
||||
as macOS and iOS do not support Vulkan natively.
|
||||
@@ -224,7 +224,7 @@ A native Metal driver is planned in the future for better performance and
|
||||
compatibility.
|
||||
|
||||
OpenGL
|
||||
^^^^^^
|
||||
~~~~~~
|
||||
|
||||
This driver uses OpenGL ES 3.0 and targets legacy and low-end devices that don't
|
||||
support Vulkan. OpenGL 3.3 Core Profile is used on desktop platforms to run this
|
||||
@@ -246,7 +246,7 @@ Many advanced features are not supported with this driver, as it targets low-end
|
||||
devices first and foremost.
|
||||
|
||||
Summary of rendering drivers/methods
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The following rendering API + rendering method combinations are currently possible:
|
||||
|
||||
@@ -447,14 +447,14 @@ used to calculate particle collisions in 2D.
|
||||
-----------------------
|
||||
|
||||
Batching and instancing
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
In the Forward+ renderer, Vulkan instancing is used to group rendering
|
||||
of identical objects for performance. This is not as fast as static mesh
|
||||
merging, but it still allows instances to be culled individually.
|
||||
|
||||
Light, decal and reflection probe rendering
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -497,7 +497,7 @@ Clustering is also used for reflection probes and decal rendering in the
|
||||
Forward+ renderer.
|
||||
|
||||
Shadow mapping
|
||||
^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
Both Forward+ and Mobile methods use
|
||||
:abbr:`PCF (Percentage Closer Filtering)` to filter shadow maps and create a
|
||||
@@ -517,7 +517,7 @@ The Compatibility renderer supports shadow mapping for DirectionalLight3D,
|
||||
OmniLight3D, and SpotLight3D lights.
|
||||
|
||||
Temporal antialiasing
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -549,7 +549,7 @@ RenderingDevice abstraction as opposed to using AMD's reference code directly.
|
||||
- `thirdparty/amd-fsr2/ <https://github.com/godotengine/godot/tree/master/thirdparty/amd-fsr2>`__
|
||||
|
||||
Global illumination
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -600,7 +600,7 @@ This would allow baking lightmaps while using the Compatibility renderer.
|
||||
- `modules/lightmapper_rd/lm_blendseams.glsl <https://github.com/godotengine/godot/blob/4.2/modules/lightmapper_rd/lm_blendseams.glsl>`__
|
||||
|
||||
Depth of field
|
||||
^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -629,7 +629,7 @@ when temporal antialiasing is enabled.
|
||||
- `servers/rendering/renderer_rd/shaders/effects/bokeh_dof_raster.glsl <https://github.com/godotengine/godot/blob/4.2/servers/rendering/renderer_rd/shaders/effects/bokeh_dof_raster.glsl>`__
|
||||
|
||||
Screen-space effects (SSAO, SSIL, SSR, SSS)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -678,7 +678,7 @@ SSR is always performed at half resolution to improve performance.
|
||||
- `servers/rendering/renderer_rd/shaders/effects/subsurface_scattering.glsl <https://github.com/godotengine/godot/blob/4.2/servers/rendering/renderer_rd/shaders/effects/subsurface_scattering.glsl>`__
|
||||
|
||||
Sky rendering
|
||||
^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
.. seealso::
|
||||
|
||||
@@ -705,7 +705,7 @@ article.
|
||||
**Sky rendering GLSL shader:**
|
||||
|
||||
Volumetric fog
|
||||
^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -740,7 +740,7 @@ article.
|
||||
- `servers/rendering/renderer_rd/shaders/environment/volumetric_fog_process.glsl <https://github.com/godotengine/godot/blob/4.2/servers/rendering/renderer_rd/shaders/environment/volumetric_fog_process.glsl>`__
|
||||
|
||||
Occlusion culling
|
||||
^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
While modern GPUs can handle drawing a lot of triangles, the number of draw
|
||||
calls in complex scenes can still be a bottleneck (even with Vulkan and Direct3D 12).
|
||||
@@ -782,7 +782,7 @@ RendererSceneOcclusionCull.
|
||||
- `servers/rendering/renderer_scene_occlusion_cull.cpp <https://github.com/godotengine/godot/blob/4.2/servers/rendering/renderer_scene_occlusion_cull.cpp>`__
|
||||
|
||||
Visibility range (LOD)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Godot supports manually authored hierarchical level of detail (HLOD), with
|
||||
distances specified by the user in the inspector.
|
||||
@@ -796,7 +796,7 @@ same mesh with different LODs (to allow for split screen rendering to look corre
|
||||
- `servers/rendering/renderer_scene_cull.cpp <https://github.com/godotengine/godot/blob/4.2/servers/rendering/renderer_scene_cull.cpp>`__
|
||||
|
||||
Automatic mesh LOD
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The ImporterMesh class is used for the 3D mesh import workflow in the editor.
|
||||
Its ``generate_lods()`` function handles generating using the
|
||||
|
||||
@@ -46,7 +46,7 @@ use of modern C++ features conservative. Their use needs to serve a real
|
||||
purpose, such as improving code readability or performance.
|
||||
|
||||
Standard Template Library
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
We don't allow using the `STL <https://en.wikipedia.org/wiki/Standard_Template_Library>`__
|
||||
as Godot provides its own data types (among other things).
|
||||
@@ -67,7 +67,7 @@ This means that pull requests should **not** use ``std::string``,
|
||||
and Array. Therefore, List should be avoided in new code unless necessary.
|
||||
|
||||
``auto`` keyword
|
||||
^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
Please don't use the ``auto`` keyword for type inference. While it can avoid
|
||||
repetition, it can also lead to confusing code:
|
||||
@@ -88,14 +88,14 @@ We chose to forbid ``auto`` instead of allowing it on a case-by-case basis to
|
||||
avoid having to decide on difficult edge cases. Thank you for your understanding.
|
||||
|
||||
Lambdas
|
||||
^^^^^^^
|
||||
~~~~~~~
|
||||
|
||||
Lambdas should be used conservatively when they make code effectively faster or
|
||||
simpler, and do not impede readability. Please ask before using lambdas in a
|
||||
pull request.
|
||||
|
||||
``#pragma once`` directive
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To follow the existing style, please use standard ``#ifdef``-based include
|
||||
guards instead of ``#pragma once`` in new files.
|
||||
|
||||
@@ -59,7 +59,7 @@ Profiler-specific instructions
|
||||
------------------------------
|
||||
|
||||
VerySleepy
|
||||
^^^^^^^^^^
|
||||
~~~~~~~~~~
|
||||
|
||||
- Start the Godot editor or your project first.
|
||||
If you start the Project Manager, make sure to edit or run a project first.
|
||||
@@ -81,7 +81,7 @@ VerySleepy
|
||||
.. image:: img/cpp_profiler_verysleepy_results_filtered.png
|
||||
|
||||
HotSpot
|
||||
^^^^^^^
|
||||
~~~~~~~
|
||||
|
||||
- Open HotSpot. Click **Record Data**:
|
||||
|
||||
@@ -128,7 +128,7 @@ HotSpot
|
||||
This process attachment-based workflow is similar to the one used by VerySleepy.
|
||||
|
||||
Xcode Instruments
|
||||
^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Open Xcode. Select **Open Developer Tool** - **Instruments** from the **Xcode** app menu:
|
||||
- Double-click on **Time Profiler** in the **Instruments** window:
|
||||
|
||||
@@ -197,7 +197,7 @@ Platform-specific sanitizers
|
||||
----------------------------
|
||||
|
||||
Web
|
||||
^^^
|
||||
~~~
|
||||
|
||||
When :ref:`compiling for the Web <doc_compiling_for_web>`,
|
||||
there are 2 additional sanitizer SCons options available:
|
||||
|
||||
Reference in New Issue
Block a user