Quellcode durchsuchen

Improve explanations around shader language's `TIME` variable

Hugo Locurcio vor 4 Jahren
Ursprung
Commit
ef874eacd4
1 geänderte Dateien mit 5 neuen und 2 gelöschten Zeilen
  1. 5 2
      tutorials/shaders/shader_reference/canvas_item_shader.rst

+ 5 - 2
tutorials/shaders/shader_reference/canvas_item_shader.rst

@@ -51,8 +51,11 @@ Global built-ins are available everywhere, including custom functions.
 +-------------------+-----------------------------------------------------------------------------+
 +-------------------+-----------------------------------------------------------------------------+
 | Built-in          | Description                                                                 |
 | Built-in          | Description                                                                 |
 +===================+=============================================================================+
 +===================+=============================================================================+
-| in float **TIME** | Global time, in seconds.                                                    |
-|                   | It's subject to the rollover setting (which is 3,600 -1 hour- by default).  |
+| in float **TIME** | Global time since the shader was compiled, in seconds (always positive).    |
+|                   | It's subject to the rollover setting (which is 3,600 seconds by default).   |
+|                   | It's not affected by :ref:`time_scale<class_Engine_property_time_scale>`    |
+|                   | or pausing, but you can define a global shader uniform to add a "scaled"    |
+|                   | ``TIME`` variable if desired.                                               |
 +-------------------+-----------------------------------------------------------------------------+
 +-------------------+-----------------------------------------------------------------------------+
 
 
 Vertex built-ins
 Vertex built-ins