summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Buring <ricardo.buring@gmail.com>2023-02-02 23:31:27 +0100
committerRicardo Buring <ricardo.buring@gmail.com>2023-02-02 23:31:27 +0100
commit086b9e0c59a51b47b657727c6bc7e5d10f83e6c5 (patch)
treeab099655a4098e112f4725715c76757cbe1497ff
parenta16b0fec4093b22ef5f14c1a4eb9363c890ab06d (diff)
Notify dependencies when setting custom mesh AABB
Fixes SoftBody3D culling issues.
-rw-r--r--drivers/gles3/storage/mesh_storage.cpp2
-rw-r--r--servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gles3/storage/mesh_storage.cpp b/drivers/gles3/storage/mesh_storage.cpp
index 5ba0c5a09c..3f8fddacff 100644
--- a/drivers/gles3/storage/mesh_storage.cpp
+++ b/drivers/gles3/storage/mesh_storage.cpp
@@ -491,6 +491,8 @@ void MeshStorage::mesh_set_custom_aabb(RID p_mesh, const AABB &p_aabb) {
Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND(!mesh);
mesh->custom_aabb = p_aabb;
+
+ mesh->dependency.changed_notify(Dependency::DEPENDENCY_CHANGED_AABB);
}
AABB MeshStorage::mesh_get_custom_aabb(RID p_mesh) const {
diff --git a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp
index f65676185c..6894498af5 100644
--- a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp
+++ b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp
@@ -586,6 +586,8 @@ void MeshStorage::mesh_set_custom_aabb(RID p_mesh, const AABB &p_aabb) {
Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND(!mesh);
mesh->custom_aabb = p_aabb;
+
+ mesh->dependency.changed_notify(Dependency::DEPENDENCY_CHANGED_AABB);
}
AABB MeshStorage::mesh_get_custom_aabb(RID p_mesh) const {