From 8b65e6d4f584f92d48d91e53d12fbbaed5833ffb Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sat, 17 Oct 2020 15:29:02 +0200 Subject: [PATCH] Improve explanations around shader language's `TIME` variable --- .../shading/shading_reference/canvas_item_shader.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tutorials/shading/shading_reference/canvas_item_shader.rst b/tutorials/shading/shading_reference/canvas_item_shader.rst index 0eed99932..38b0a5597 100644 --- a/tutorials/shading/shading_reference/canvas_item_shader.rst +++ b/tutorials/shading/shading_reference/canvas_item_shader.rst @@ -51,8 +51,12 @@ Global built-ins are available everywhere, including custom functions. +-------------------+-----------------------------------------------------------------------------+ | 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` | +| | or pausing, but you can override the ``TIME`` variable's time scale by | +| | calling ``VisualServer.set_shader_time_scale()`` with the desired | +| | time scale factor as parameter (``1.0`` being the default). | +-------------------+-----------------------------------------------------------------------------+ Vertex built-ins