summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd/forward_clustered
diff options
context:
space:
mode:
authorjfons <joan.fonssanchez@gmail.com>2022-06-21 16:26:17 +0200
committerJFonS <joan.fonssanchez@gmail.com>2022-06-22 12:24:37 +0200
commit0f38e7961731fd52c64d15b631a6b9ab05b38ce5 (patch)
treea995cdaefd8305672b8e0b30c608c84e3fefcf69 /servers/rendering/renderer_rd/forward_clustered
parentfdfbaf9f0f3fb8cbf640f0d409257039c14f314f (diff)
Move TIME to a global shader variable
This makes it work consistently for motion vectors in all functions, including user-defined ones.
Diffstat (limited to 'servers/rendering/renderer_rd/forward_clustered')
-rw-r--r--servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp
index cfb30ef2f3..182aecd3be 100644
--- a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp
+++ b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp
@@ -621,7 +621,7 @@ void SceneShaderForwardClustered::init(RendererStorageRD *p_storage, const Strin
//builtins
- actions.renames["TIME"] = "scene_data_block.data.time";
+ actions.renames["TIME"] = "global_time";
actions.renames["PI"] = _MKSTR(Math_PI);
actions.renames["TAU"] = _MKSTR(Math_TAU);
actions.renames["E"] = _MKSTR(Math_E);