diff options
author | Arman Elgudzhyan <48544263+puchik@users.noreply.github.com> | 2023-07-22 20:53:39 -0700 |
---|---|---|
committer | Arman Elgudzhyan <48544263+puchik@users.noreply.github.com> | 2024-02-15 22:37:07 -0800 |
commit | 7ac8365e1122299eaf783310bf61c3c8148579cc (patch) | |
tree | d9c3c4a716366c8b429c64b63eb0de2458370ff6 /servers/rendering/renderer_rd/storage_rd/mesh_storage.h | |
parent | a9bb8509f2faac81bdb995c6c89a5347372f3498 (diff) | |
download | redot-engine-7ac8365e1122299eaf783310bf61c3c8148579cc.tar.gz |
Support custom AABB within MultiMesh resources
- Supporting custom AABB on the MultiMesh resource itself allows us to prevent costly runtime AABB recalculations.
- Should also help improve CPU Particle performance.
Diffstat (limited to 'servers/rendering/renderer_rd/storage_rd/mesh_storage.h')
-rw-r--r-- | servers/rendering/renderer_rd/storage_rd/mesh_storage.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/storage_rd/mesh_storage.h b/servers/rendering/renderer_rd/storage_rd/mesh_storage.h index 771ac6d380..5491f637bc 100644 --- a/servers/rendering/renderer_rd/storage_rd/mesh_storage.h +++ b/servers/rendering/renderer_rd/storage_rd/mesh_storage.h @@ -220,6 +220,7 @@ private: bool uses_custom_data = false; int visible_instances = -1; AABB aabb; + AABB custom_aabb; bool aabb_dirty = false; bool buffer_set = false; bool motion_vectors_enabled = false; @@ -646,6 +647,9 @@ public: virtual void multimesh_set_visible_instances(RID p_multimesh, int p_visible) override; virtual int multimesh_get_visible_instances(RID p_multimesh) const override; + virtual void multimesh_set_custom_aabb(RID p_multimesh, const AABB &p_aabb) override; + virtual AABB multimesh_get_custom_aabb(RID p_multimesh) const override; + virtual AABB multimesh_get_aabb(RID p_multimesh) const override; void _update_dirty_multimeshes(); |