Skip to content

Commit 4679999

Browse files
committed
Tweak constant example in Shading language to avoid referring to reserved PI
1 parent 84842eb commit 4679999

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tutorials/shaders/shader_reference/shading_language.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ accessible outside of the shader.
383383
384384
shader_type spatial;
385385
386-
const float PI = 3.14159265358979323846;
386+
const float GOLDEN_RATIO = 1.618033988749894;
387387
388388
Constants of the ``float`` type must be initialized using ``.`` notation after the
389389
decimal part or by using the scientific notation. The optional ``f`` post-suffix is
@@ -811,7 +811,7 @@ GDScript:
811811
smaller than a ``vec4``, such as ``vec2`` or ``vec3``, are padded to
812812
the size of a ``vec4``. Scalar uniforms such as ``int`` or ``float``
813813
are not padded, and ``bool`` is padded to the size of an ``int``.
814-
814+
815815
Arrays count as the total size of their contents. If you need a uniform
816816
array that is larger than this limit, consider packing the data into a
817817
texture instead, since the *contents* of a texture do not count towards

0 commit comments

Comments
 (0)