You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
meshopt_generateVertexRemap uses binary equivalence of vertex data, which is generally a reasonable default; however, in some cases some attributes may have floating point drift causing extra vertices to be generated. For such cases, it may be necessary to quantize some attributes (most importantly, normals and tangents) before generating the remap, or use a custom weld algorithm that supports per-attribute tolerance instead.
Since rolling a custom version of the algorithm for a single-line change also comes with a maintenance cost, would it be possible to provide a variant of the algorithm that allows the specification of custom distance functions?
For instance by extending the meshopt_Stream struct or by passing a function pointer to the signature, which then gets the stream and element?
The text was updated successfully, but these errors were encountered:
Yeah I plan to add support for tolerance based remapping eventually. It would be helpful to have a generic algorithm for this use case.
This is not a single-line change, and exposing a callback isn't quite enough; this requires a different algorithm, and perhaps an interface where the implementation has direct access to floating point values (or not; for normals it might be better to compare the dot product for example).
zeux
changed the title
Provide custom distance function for vertex remapping?
Vertex remapping/reindexing with approximate equality
Sep 29, 2024
As the README states,
Since rolling a custom version of the algorithm for a single-line change also comes with a maintenance cost, would it be possible to provide a variant of the algorithm that allows the specification of custom distance functions?
For instance by extending the
meshopt_Stream
struct or by passing a function pointer to the signature, which then gets the stream and element?The text was updated successfully, but these errors were encountered: