Merge pull request #64416 from aaronfranke/aabb

Don't try to merge unused bone AABBs in the rendering server
This commit is contained in:
Clay John 2022-08-17 23:56:05 -06:00 committed by GitHub
commit 982ff7d925
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -255,7 +255,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);
}

View File

@ -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);
}