diff options
author | K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com> | 2021-04-09 22:44:36 -0700 |
---|---|---|
committer | K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com> | 2021-05-22 08:58:50 -0700 |
commit | fc8ea1d828a6b00c3c0ac0ed31c45fdad61a0c9c (patch) | |
tree | 87d92ae27cf53e92b9dfa09ae17fa2d293d8bf97 /thirdparty/meshoptimizer/meshoptimizer.h | |
parent | 4828667759bca621570862d05e95316235bb05e4 (diff) | |
download | redot-engine-fc8ea1d828a6b00c3c0ac0ed31c45fdad61a0c9c.tar.gz |
Update with experimental mesh optimizer.
Normals being optimized has better quality now.
Test simplify once and then use a slightly less tolerant
error for the target error.
Diffstat (limited to 'thirdparty/meshoptimizer/meshoptimizer.h')
-rw-r--r-- | thirdparty/meshoptimizer/meshoptimizer.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/thirdparty/meshoptimizer/meshoptimizer.h b/thirdparty/meshoptimizer/meshoptimizer.h index fe8d349731..e44b99ce52 100644 --- a/thirdparty/meshoptimizer/meshoptimizer.h +++ b/thirdparty/meshoptimizer/meshoptimizer.h @@ -299,6 +299,11 @@ MESHOPTIMIZER_EXPERIMENTAL void meshopt_decodeFilterExp(void* buffer, size_t ver MESHOPTIMIZER_EXPERIMENTAL size_t meshopt_simplify(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t target_index_count, float target_error, float* result_error); /** + * Experimental: Mesh simplifier with attribute metric; attributes follow xyz position data atm (vertex data must contain 3 + attribute_count floats per vertex) + */ +MESHOPTIMIZER_EXPERIMENTAL size_t meshopt_simplifyWithAttributes(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_data, size_t vertex_count, size_t vertex_stride, size_t target_index_count, float target_error, float* result_error, const float* attributes, const float* attribute_weights, size_t attribute_count); + +/** * Experimental: Mesh simplifier (sloppy) * Reduces the number of triangles in the mesh, sacrificing mesh apperance for simplification performance * The algorithm doesn't preserve mesh topology but can stop short of the target goal based on target error. |