浏览代码

Merge pull request #61854 from Chaosus/shader_fix_time

Fix `TIME` compilation for custom functions in spatial shader
Rémi Verschelde 3 年之前
父节点
当前提交
d120b099f5

+ 1 - 1
servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp

@@ -621,7 +621,7 @@ void SceneShaderForwardClustered::init(RendererStorageRD *p_storage, const Strin
 
 
 		//builtins
 		//builtins
 
 
-		actions.renames["TIME"] = "scene_data.time";
+		actions.renames["TIME"] = "scene_data_block.data.time";
 		actions.renames["PI"] = _MKSTR(Math_PI);
 		actions.renames["PI"] = _MKSTR(Math_PI);
 		actions.renames["TAU"] = _MKSTR(Math_TAU);
 		actions.renames["TAU"] = _MKSTR(Math_TAU);
 		actions.renames["E"] = _MKSTR(Math_E);
 		actions.renames["E"] = _MKSTR(Math_E);

+ 1 - 1
servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp

@@ -529,7 +529,7 @@ void SceneShaderForwardMobile::init(RendererStorageRD *p_storage, const String p
 
 
 		//builtins
 		//builtins
 
 
-		actions.renames["TIME"] = "scene_data.time";
+		actions.renames["TIME"] = "scene_data_block.data.time";
 		actions.renames["PI"] = _MKSTR(Math_PI);
 		actions.renames["PI"] = _MKSTR(Math_PI);
 		actions.renames["TAU"] = _MKSTR(Math_TAU);
 		actions.renames["TAU"] = _MKSTR(Math_TAU);
 		actions.renames["E"] = _MKSTR(Math_E);
 		actions.renames["E"] = _MKSTR(Math_E);