diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2022-12-22 16:22:33 +0100 |
---|---|---|
committer | Lyuma <xn.lyuma@gmail.com> | 2023-01-31 22:27:49 -0800 |
commit | cf9df3b5d49a80e8adad87dc362e479cc1d7d436 (patch) | |
tree | 55bae697b260b82fbe21b02edd3236639d6b9f97 /scene/3d | |
parent | 0810ecaafdbee3ea747219e6ab3a8de5d2216a09 (diff) |
meshoptimizer: Sync with upstream commit 4a287848f
https://github.com/zeux/meshoptimizer/commit/4a287848fd664ae1c3fc8e5e008560534ceeb526
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); } |