mirror of
https://github.com/godotengine/godot.git
synced 2024-12-21 10:25:24 +08:00
e2cc0e484e
The Godot-specific patch is just a single line now; removing this patch will likely require adjusting Godot importer code to handle error limits better. This also adds new SIMPLIFY_ options; Godot is currently not using any of these but might use SIMPLIFY_PRUNE and SIMPLIFY_SPARSE in the future.
14 lines
563 B
Diff
14 lines
563 B
Diff
diff --git a/thirdparty/meshoptimizer/simplifier.cpp b/thirdparty/meshoptimizer/simplifier.cpp
|
|
index af64cbda49..8a7072fe4e 100644
|
|
--- a/thirdparty/meshoptimizer/simplifier.cpp
|
|
+++ b/thirdparty/meshoptimizer/simplifier.cpp
|
|
@@ -2048,7 +2048,7 @@ size_t meshopt_simplifyEdge(unsigned int* destination, const unsigned int* indic
|
|
|
|
// result_error is quadratic; we need to remap it back to linear
|
|
if (out_result_error)
|
|
- *out_result_error = sqrtf(result_error) * error_scale;
|
|
+ *out_result_error = sqrtf(vertex_error) * error_scale;
|
|
|
|
return result_count;
|
|
}
|