diff options
author | Clay John <claynjohn@gmail.com> | 2022-08-17 23:56:05 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-17 23:56:05 -0600 |
commit | 982ff7d925c61dd0b592d08cafa092e46ea6eec1 (patch) | |
tree | bb4e33d6b3105e95a97923ebef12e78b9dd92d45 /servers/rendering | |
parent | dbd15243621ec595742b18abc4c26f3cb2e00f3d (diff) | |
parent | e0d80b37e94c4518114e16fdc7ee7a9727b58675 (diff) |
Merge pull request #64416 from aaronfranke/aabb
Don't try to merge unused bone AABBs in the rendering server
Diffstat (limited to 'servers/rendering')
-rw-r--r-- | servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp index dc3f35f942..08cfeb2019 100644 --- a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp @@ -416,7 +416,10 @@ void MeshStorage::mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface) mesh->bone_aabbs.resize(p_surface.bone_aabbs.size()); } for (int i = 0; i < p_surface.bone_aabbs.size(); i++) { - mesh->bone_aabbs.write[i].merge_with(p_surface.bone_aabbs[i]); + AABB bone = p_surface.bone_aabbs[i]; + if (!bone.has_no_volume()) { + mesh->bone_aabbs.write[i].merge_with(p_surface.bone_aabbs[i]); + } } mesh->aabb.merge_with(p_surface.aabb); } |