Skip to content

Commit 7c1eefd

Browse files
committed
TIME is affected by time_scale
1 parent 469176a commit 7c1eefd

File tree

5 files changed

+91
-88
lines changed

5 files changed

+91
-88
lines changed

tutorials/shaders/shader_reference/canvas_item_shader.rst

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,27 @@ Global built-ins
5050

5151
Global built-ins are available everywhere, including custom functions.
5252

53-
+-------------------+-----------------------------------------------------------------------------------------+
54-
| Built-in | Description |
55-
+===================+=========================================================================================+
56-
| in float **TIME** | Global time since the engine has started, in seconds. It repeats after every ``3,600`` |
57-
| | seconds (which can be changed with the |
58-
| | :ref:`rollover<class_ProjectSettings_property_rendering/limits/time/time_rollover_secs>`|
59-
| | setting). It's not affected by :ref:`time_scale<class_Engine_property_time_scale>` or |
60-
| | pausing. If you need a ``TIME`` variable that can be scaled or paused, add your own |
61-
| | :ref:`global shader uniform<doc_shading_language_global_uniforms>` and update it each |
62-
| | frame. |
63-
+-------------------+-----------------------------------------------------------------------------------------+
64-
| in float **PI** | A ``PI`` constant (``3.141592``). |
65-
| | A ratio of a circle's circumference to its diameter and amount of radians in half turn. |
66-
+-------------------+-----------------------------------------------------------------------------------------+
67-
| in float **TAU** | A ``TAU`` constant (``6.283185``). |
68-
| | An equivalent of ``PI * 2`` and amount of radians in full turn. |
69-
+-------------------+-----------------------------------------------------------------------------------------+
70-
| in float **E** | An ``E`` constant (``2.718281``). |
71-
| | Euler's number and a base of the natural logarithm. |
72-
+-------------------+-----------------------------------------------------------------------------------------+
53+
+-------------------+------------------------------------------------------------------------------------------+
54+
| Built-in | Description |
55+
+===================+==========================================================================================+
56+
| in float **TIME** | Global time since the engine has started, in seconds. It repeats after every ``3,600`` |
57+
| | seconds (which can be changed with the |
58+
| | :ref:`rollover<class_ProjectSettings_property_rendering/limits/time/time_rollover_secs>` |
59+
| | setting). It's affected by |
60+
| | :ref:`time_scale<class_Engine_property_time_scale>` but not by pausing. If you need a |
61+
| | ``TIME`` variable that is not affected by time scale, add your own |
62+
| | :ref:`global shader uniform<doc_shading_language_global_uniforms>` and update it each |
63+
| | frame. |
64+
+-------------------+------------------------------------------------------------------------------------------+
65+
| in float **PI** | A ``PI`` constant (``3.141592``). |
66+
| | A ratio of a circle's circumference to its diameter and amount of radians in half turn. |
67+
+-------------------+------------------------------------------------------------------------------------------+
68+
| in float **TAU** | A ``TAU`` constant (``6.283185``). |
69+
| | An equivalent of ``PI * 2`` and amount of radians in full turn. |
70+
+-------------------+------------------------------------------------------------------------------------------+
71+
| in float **E** | An ``E`` constant (``2.718281``). |
72+
| | Euler's number and a base of the natural logarithm. |
73+
+-------------------+------------------------------------------------------------------------------------------+
7374

7475
Vertex built-ins
7576
^^^^^^^^^^^^^^^^

tutorials/shaders/shader_reference/fog_shader.rst

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,27 @@ Global built-ins
3131
Global built-ins are available everywhere, including in custom functions.
3232

3333

34-
+---------------------------------+-----------------------------------------------------------------------------------------+
35-
| Built-in | Description |
36-
+=================================+=========================================================================================+
37-
| in float **TIME** | Global time since the engine has started, in seconds. It repeats after every ``3,600`` |
38-
| | seconds (which can be changed with the |
39-
| | :ref:`rollover<class_ProjectSettings_property_rendering/limits/time/time_rollover_secs>`|
40-
| | setting). It's not affected by :ref:`time_scale<class_Engine_property_time_scale>` or |
41-
| | pausing. If you need a ``TIME`` variable that can be scaled or paused, add your own |
42-
| | :ref:`global shader uniform<doc_shading_language_global_uniforms>` and update it each |
43-
| | frame. |
44-
+---------------------------------+-----------------------------------------------------------------------------------------+
45-
| in float **PI** | A ``PI`` constant (``3.141592``). |
46-
| | A ratio of a circle's circumference to its diameter and amount of radians in half turn. |
47-
+---------------------------------+-----------------------------------------------------------------------------------------+
48-
| in float **TAU** | A ``TAU`` constant (``6.283185``). |
49-
| | An equivalent of ``PI * 2`` and amount of radians in full turn. |
50-
+---------------------------------+-----------------------------------------------------------------------------------------+
51-
| in float **E** | An ``E`` constant (``2.718281``). |
52-
| | Euler's number and a base of the natural logarithm. |
53-
+---------------------------------+-----------------------------------------------------------------------------------------+
34+
+-----------------------------------+------------------------------------------------------------------------------------------+
35+
| Built-in | Description |
36+
+===================================+==========================================================================================+
37+
| in float **TIME** | Global time since the engine has started, in seconds. It repeats after every ``3,600`` |
38+
| | seconds (which can be changed with the |
39+
| | :ref:`rollover<class_ProjectSettings_property_rendering/limits/time/time_rollover_secs>` |
40+
| | setting). It's affected by |
41+
| | :ref:`time_scale<class_Engine_property_time_scale>` but not by pausing. If you need a |
42+
| | ``TIME`` variable that is not affected by time scale, add your own |
43+
| | :ref:`global shader uniform<doc_shading_language_global_uniforms>` and update it each |
44+
| | frame. |
45+
+-----------------------------------+------------------------------------------------------------------------------------------+
46+
| in float **PI** | A ``PI`` constant (``3.141592``). |
47+
| | A ratio of a circle's circumference to its diameter and amount of radians in half turn. |
48+
+-----------------------------------+------------------------------------------------------------------------------------------+
49+
| in float **TAU** | A ``TAU`` constant (``6.283185``). |
50+
| | An equivalent of ``PI * 2`` and amount of radians in full turn. |
51+
+-----------------------------------+------------------------------------------------------------------------------------------+
52+
| in float **E** | An ``E`` constant (``2.718281``). |
53+
| | Euler's number and a base of the natural logarithm. |
54+
+-----------------------------------+------------------------------------------------------------------------------------------+
5455

5556
Fog built-ins
5657
^^^^^^^^^^^^^

tutorials/shaders/shader_reference/particle_shader.rst

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,25 +54,26 @@ Global built-ins
5454

5555
Global built-ins are available everywhere, including custom functions.
5656

57-
+-------------------+-----------------------------------------------------------------------------------------+
58-
| Built-in | Description |
59-
+===================+=========================================================================================+
60-
| in float **TIME** | Global time since the engine has started, in seconds. It repeats after every ``3,600`` |
61-
| | seconds (which can be changed with the |
62-
| | :ref:`rollover<class_ProjectSettings_property_rendering/limits/time/time_rollover_secs>`|
63-
| | setting). It's not affected by :ref:`time_scale<class_Engine_property_time_scale>` or |
64-
| | pausing. If you need a ``TIME`` variable that can be scaled or paused, add your own |
65-
| | :ref:`global shader uniform<doc_shading_language_global_uniforms>` and update it each |
66-
| | frame. |
67-
+-------------------+-----------------------------------------------------------------------------------------+
68-
| in float **PI** | A ``PI`` constant (``3.141592``). |
69-
| | A ratio of a circle's circumference to its diameter and amount of radians in half turn. |
70-
+-------------------+-----------------------------------------------------------------------------------------+
71-
| in float **TAU** | A ``TAU`` constant (``6.283185``). |
72-
| | An equivalent of ``PI * 2`` and amount of radians in full turn. |
73-
+-------------------+-----------------------------------------------------------------------------------------+
74-
| in float **E** | An ``E`` constant (``2.718281``). Euler's number and a base of the natural logarithm. |
75-
+-------------------+-----------------------------------------------------------------------------------------+
57+
+-------------------+------------------------------------------------------------------------------------------+
58+
| Built-in | Description |
59+
+===================+==========================================================================================+
60+
| in float **TIME** | Global time since the engine has started, in seconds. It repeats after every ``3,600`` |
61+
| | seconds (which can be changed with the |
62+
| | :ref:`rollover<class_ProjectSettings_property_rendering/limits/time/time_rollover_secs>` |
63+
| | setting). It's affected by |
64+
| | :ref:`time_scale<class_Engine_property_time_scale>` but not by pausing. If you need a |
65+
| | ``TIME`` variable that is not affected by time scale, add your own |
66+
| | :ref:`global shader uniform<doc_shading_language_global_uniforms>` and update it each |
67+
| | frame. |
68+
+-------------------+------------------------------------------------------------------------------------------+
69+
| in float **PI** | A ``PI`` constant (``3.141592``). |
70+
| | A ratio of a circle's circumference to its diameter and amount of radians in half turn. |
71+
+-------------------+------------------------------------------------------------------------------------------+
72+
| in float **TAU** | A ``TAU`` constant (``6.283185``). |
73+
| | An equivalent of ``PI * 2`` and amount of radians in full turn. |
74+
+-------------------+------------------------------------------------------------------------------------------+
75+
| in float **E** | An ``E`` constant (``2.718281``). Euler's number and a base of the natural logarithm. |
76+
+-------------------+------------------------------------------------------------------------------------------+
7677

7778
Start and Process built-ins
7879
^^^^^^^^^^^^^^^^^^^^^^^^^^^

tutorials/shaders/shader_reference/sky_shader.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,10 @@ There are 4 ``LIGHTX`` lights, accessed as ``LIGHT0``, ``LIGHT1``, ``LIGHT2``, a
157157
| in float **TIME** | Global time since the engine has started, in seconds. It repeats after every ``3,600`` |
158158
| | seconds (which can be changed with the |
159159
| | :ref:`rollover<class_ProjectSettings_property_rendering/limits/time/time_rollover_secs>` |
160-
| | setting). It's not affected by :ref:`time_scale<class_Engine_property_time_scale>` or |
161-
| | pausing. If you need a ``TIME`` variable that can be scaled or paused, add your own |
160+
| | setting). It's affected by :ref:`time_scale<class_Engine_property_time_scale>` but not by pausing. If you need a |
161+
| | ``TIME`` variable that is not affected by time scale, add your own |
162162
| | :ref:`global shader uniform<doc_shading_language_global_uniforms>` and update it each |
163-
| | frame. |
163+
| | frame. |
164164
+---------------------------------+--------------------------------------------------------------------------------------------------------------------------+
165165
| in vec3 **POSITION** | Camera position, in world space. |
166166
+---------------------------------+--------------------------------------------------------------------------------------------------------------------------+

0 commit comments

Comments
 (0)