Skip to content

Commit

Permalink
Merge pull request #10163 from Calinou/shading-language-tweak-constant
Browse files Browse the repository at this point in the history
Tweak constant example in Shading language to avoid referring to reserved `PI`
  • Loading branch information
skyace65 authored Oct 29, 2024
2 parents eb01c7c + 4679999 commit f512e1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tutorials/shaders/shader_reference/shading_language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f512e1e

Please sign in to comment.