diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-31 11:07:24 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-31 11:07:24 +0100 |
commit | 3312d0a87bd81d3e656ce0a12d9109837b140ab6 (patch) | |
tree | 4154ce8f1aa421147fe01d46bfac2960edbd3315 /servers | |
parent | d6aa3078ab9faf2f9f9f466fb1ff97d9607ed54a (diff) | |
parent | 020ac29fc3542a88f988262c7b4ccbccd5c2557c (diff) |
Merge pull request #67907 from clayjohn/RD-model-matrix
Correctly rename to read_model_matrix when using shader builtins that rely on model matrix
Diffstat (limited to 'servers')
-rw-r--r-- | servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp | 4 | ||||
-rw-r--r-- | servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp | 4 |
2 files changed, 4 insertions, 4 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 c01919a606..c1b23af82f 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 @@ -697,10 +697,10 @@ void SceneShaderForwardClustered::init(const String p_defines) { actions.renames["CUSTOM3"] = "custom3_attrib"; actions.renames["OUTPUT_IS_SRGB"] = "SHADER_IS_SRGB"; - actions.renames["NODE_POSITION_WORLD"] = "model_matrix[3].xyz"; + actions.renames["NODE_POSITION_WORLD"] = "read_model_matrix[3].xyz"; actions.renames["CAMERA_POSITION_WORLD"] = "scene_data.inv_view_matrix[3].xyz"; actions.renames["CAMERA_DIRECTION_WORLD"] = "scene_data.view_matrix[3].xyz"; - actions.renames["NODE_POSITION_VIEW"] = "(model_matrix * scene_data.view_matrix)[3].xyz"; + actions.renames["NODE_POSITION_VIEW"] = "(read_model_matrix * scene_data.view_matrix)[3].xyz"; actions.renames["VIEW_INDEX"] = "ViewIndex"; actions.renames["VIEW_MONO_LEFT"] = "0"; diff --git a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp index 71fb3ee4f5..02bd30d32d 100644 --- a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp +++ b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp @@ -597,10 +597,10 @@ void SceneShaderForwardMobile::init(const String p_defines) { actions.renames["CUSTOM3"] = "custom3_attrib"; actions.renames["OUTPUT_IS_SRGB"] = "SHADER_IS_SRGB"; - actions.renames["NODE_POSITION_WORLD"] = "model_matrix[3].xyz"; + actions.renames["NODE_POSITION_WORLD"] = "read_model_matrix[3].xyz"; actions.renames["CAMERA_POSITION_WORLD"] = "scene_data.inv_view_matrix[3].xyz"; actions.renames["CAMERA_DIRECTION_WORLD"] = "scene_data.view_matrix[3].xyz"; - actions.renames["NODE_POSITION_VIEW"] = "(model_matrix * scene_data.view_matrix)[3].xyz"; + actions.renames["NODE_POSITION_VIEW"] = "(read_model_matrix * scene_data.view_matrix)[3].xyz"; actions.renames["VIEW_INDEX"] = "ViewIndex"; actions.renames["VIEW_MONO_LEFT"] = "0"; |