diff options
author | NumbuhFour <francesco.thefourth@gmail.com> | 2022-10-12 19:33:06 -0700 |
---|---|---|
committer | NumbuhFour <francesco.thefourth@gmail.com> | 2022-12-03 22:41:27 -0800 |
commit | 1b09fd5410d313a422fa37ce7eff53daea7bf6a3 (patch) | |
tree | b92bf0397c3d255c942ffb8fa5423d76ddb8fe09 /servers/rendering/renderer_rd/forward_clustered | |
parent | 015dc492de33a41eaeb14c0503a6be10466fe457 (diff) |
Implement CAMERA_VISIBLE_LAYERS as built-in shader variable
Diffstat (limited to 'servers/rendering/renderer_rd/forward_clustered')
-rw-r--r-- | servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp | 1 |
1 files changed, 1 insertions, 0 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 6c8ce5265e..b5d4098e65 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 @@ -709,6 +709,7 @@ void SceneShaderForwardClustered::init(const String p_defines) { 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["CAMERA_VISIBLE_LAYERS"] = "scene_data.camera_visible_layers"; actions.renames["NODE_POSITION_VIEW"] = "(read_model_matrix * scene_data.view_matrix)[3].xyz"; actions.renames["VIEW_INDEX"] = "ViewIndex"; |