From 4679999c4de41b19d97daab8b3f873bbbfd6e746 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 29 Oct 2024 15:15:43 +0100 Subject: [PATCH] Tweak constant example in Shading language to avoid referring to reserved `PI` --- tutorials/shaders/shader_reference/shading_language.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/shaders/shader_reference/shading_language.rst b/tutorials/shaders/shader_reference/shading_language.rst index 7d998039ddc..ccf5fc15bad 100644 --- a/tutorials/shaders/shader_reference/shading_language.rst +++ b/tutorials/shaders/shader_reference/shading_language.rst @@ -383,7 +383,7 @@ accessible outside of the shader. shader_type spatial; - const float PI = 3.14159265358979323846; + const float GOLDEN_RATIO = 1.618033988749894; Constants of the ``float`` type must be initialized using ``.`` notation after the decimal part or by using the scientific notation. The optional ``f`` post-suffix is @@ -811,7 +811,7 @@ GDScript: smaller than a ``vec4``, such as ``vec2`` or ``vec3``, are padded to the size of a ``vec4``. Scalar uniforms such as ``int`` or ``float`` are not padded, and ``bool`` is padded to the size of an ``int``. - + Arrays count as the total size of their contents. If you need a uniform array that is larger than this limit, consider packing the data into a texture instead, since the *contents* of a texture do not count towards