diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-01 07:40:23 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-01 07:40:23 +0100 |
commit | 64f0dad2dcb3b4332c7c4c17c8ca31fb5628618c (patch) | |
tree | 8592c997f569fce6229ef34f83466b08d6fb76bf /scene/3d | |
parent | 0c540210bdfb731f9257b26b168e443a11f8a250 (diff) | |
parent | cf9df3b5d49a80e8adad87dc362e479cc1d7d436 (diff) |
Merge pull request #70446 from akien-mga/meshoptimizer-4a287848f
meshoptimizer: Sync with upstream commit 4a287848f
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/occluder_instance_3d.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/3d/occluder_instance_3d.cpp b/scene/3d/occluder_instance_3d.cpp index 632b27953f..594580a205 100644 --- a/scene/3d/occluder_instance_3d.cpp +++ b/scene/3d/occluder_instance_3d.cpp @@ -542,13 +542,14 @@ void OccluderInstance3D::_bake_surface(const Transform3D &p_transform, Array p_s float error = -1.0f; int target_index_count = MIN(indices.size(), 36); + const int simplify_options = SurfaceTool::SIMPLIFY_LOCK_BORDER; + uint32_t index_count = SurfaceTool::simplify_func( (unsigned int *)indices.ptrw(), (unsigned int *)indices.ptr(), indices.size(), vertices_f32.ptr(), vertices.size(), sizeof(float) * 3, - target_index_count, target_error, &error); - + target_index_count, target_error, simplify_options, &error); indices.resize(index_count); } |