@@ -96,25 +96,32 @@ Global built-ins
9696
9797Global built-ins are available everywhere, including custom functions.
9898
99- +-------------------+-----------------------------------------------------------------------------------------+
100- | Built-in | Description |
101- +===================+=========================================================================================+
102- | in float **TIME ** | Global time since the engine has started, in seconds. It repeats after every ``3,600 `` |
103- | | seconds (which can be changed with the |
104- | | :ref:`rollover<class_ProjectSettings_property_rendering/limits/time/time_rollover_secs>`|
105- | | setting). It's not affected by :ref: `time_scale<class_Engine_property_time_scale> ` or |
106- | | pausing. If you need a ``TIME `` variable that can be scaled or paused, add your own |
107- | | :ref: `global shader uniform<doc_shading_language_global_uniforms> ` and update it each |
108- | | frame. |
109- +-------------------+-----------------------------------------------------------------------------------------+
110- | in float **PI ** | A ``PI `` constant (``3.141592 ``). |
111- | | A ratio of a circle's circumference to its diameter and amount of radians in half turn. |
112- +-------------------+-----------------------------------------------------------------------------------------+
113- | in float **TAU ** | A ``TAU `` constant (``6.283185 ``). |
114- | | An equivalent of ``PI * 2 `` and amount of radians in full turn. |
115- +-------------------+-----------------------------------------------------------------------------------------+
116- | in float **E ** | An ``E `` constant (``2.718281 ``). Euler's number and a base of the natural logarithm. |
117- +-------------------+-----------------------------------------------------------------------------------------+
99+ +-----------------------------+------------------------------------------------------------------------------------------+
100+ | Built-in | Description |
101+ +=============================+==========================================================================================+
102+ | in float **TIME ** | Global time since the engine has started, in seconds. It repeats after every ``3,600 `` |
103+ | | seconds (which can be changed with the |
104+ | | :ref: `rollover<class_ProjectSettings_property_rendering/limits/time/time_rollover_secs> ` |
105+ | | setting). It's not affected by :ref: `time_scale<class_Engine_property_time_scale> ` or |
106+ | | pausing. If you need a ``TIME `` variable that can be scaled or paused, add your own |
107+ | | :ref: `global shader uniform<doc_shading_language_global_uniforms> ` and update it each |
108+ | | frame. |
109+ +-----------------------------+------------------------------------------------------------------------------------------+
110+ | in float **PI ** | A ``PI `` constant (``3.141592 ``). |
111+ | | A ratio of a circle's circumference to its diameter and amount of radians in half turn. |
112+ +-----------------------------+------------------------------------------------------------------------------------------+
113+ | in float **TAU ** | A ``TAU `` constant (``6.283185 ``). |
114+ | | An equivalent of ``PI * 2 `` and amount of radians in full turn. |
115+ +-----------------------------+------------------------------------------------------------------------------------------+
116+ | in float **E ** | An ``E `` constant (``2.718281 ``). Euler's number and a base of the natural logarithm. |
117+ +-----------------------------+------------------------------------------------------------------------------------------+
118+ | in bool **OUTPUT_IS_SRGB ** | ``true `` when output is in sRGB color space (this is ``true `` in the Compatibility |
119+ | | renderer, ``false `` in Forward+ and Forward Mobile). |
120+ +----------------------------------------+-------------------------------------------------------------------------------+
121+ | in float **CLIP_SPACE_FAR ** | Clip space far ``z `` value. |
122+ | | In the Forward+ or Mobile renderers, it's ``0.0 ``. |
123+ | | In the Compatibility renderer, it's ``-1.0 ``. |
124+ +-----------------------------+------------------------------------------------------------------------------------------+
118125
119126Vertex built-ins
120127^^^^^^^^^^^^^^^^
@@ -181,10 +188,6 @@ shader, this value can be used as desired.
181188+----------------------------------------+--------------------------------------------------------+
182189| in uint **CAMERA_VISIBLE_LAYERS ** | Cull layers of the camera rendering the current pass. |
183190+----------------------------------------+--------------------------------------------------------+
184- | in bool **OUTPUT_IS_SRGB ** | ``true `` when output is in sRGB color space |
185- | | (this is ``true `` in the Compatibility renderer, |
186- | | ``false `` in Forward+ and Forward Mobile). |
187- +----------------------------------------+--------------------------------------------------------+
188191| in int **INSTANCE_ID ** | Instance ID for instancing. |
189192+----------------------------------------+--------------------------------------------------------+
190193| in vec4 **INSTANCE_CUSTOM ** | Instance custom data (for particles, mostly). |
@@ -285,9 +288,6 @@ these properties, and if you don't write to them, Godot will optimize away the c
285288+----------------------------------------+--------------------------------------------------------------------------------------------------+
286289| in vec2 **POINT_COORD ** | Point coordinate for drawing points with ``POINT_SIZE ``. |
287290+----------------------------------------+--------------------------------------------------------------------------------------------------+
288- | in bool **OUTPUT_IS_SRGB ** | ``true `` when output is in sRGB color space (this is ``true `` in the Compatibility renderer, |
289- | | ``false `` in Forward+ and Forward Mobile). |
290- +----------------------------------------+--------------------------------------------------------------------------------------------------+
291291| in mat4 **MODEL_MATRIX ** | Model/local space to world space transform. |
292292+----------------------------------------+--------------------------------------------------------------------------------------------------+
293293| in mat3 **MODEL_NORMAL_MATRIX ** | |
@@ -484,10 +484,6 @@ If you want the lights to add together, add the light contribution to ``DIFFUSE_
484484+-----------------------------------+------------------------------------------------------------------------+
485485| in float **ROUGHNESS ** | Roughness. |
486486+-----------------------------------+------------------------------------------------------------------------+
487- | in bool **OUTPUT_IS_SRGB ** | ``true `` when output is in sRGB color space. |
488- | | This is ``true `` in the Compatibility renderer, |
489- | | ``false `` in Forward+ and Forward Mobile. |
490- +-----------------------------------+------------------------------------------------------------------------+
491487| out vec3 **DIFFUSE_LIGHT ** | Diffuse light result. |
492488+-----------------------------------+------------------------------------------------------------------------+
493489| out vec3 **SPECULAR_LIGHT ** | Specular light result. |
0 commit comments