Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize JoinVerticesProcess for multiple UV and color channels #4872

Merged
merged 2 commits into from Jan 17, 2023

Conversation

drbct
Copy link
Contributor

@drbct drbct commented Jan 12, 2023

On the current master branch, JoinVerticesProcess silently ignores all UV channels except the first as well as all color channels. This causes vertices to be merged unexpectedly if they differ only in one of those attributes. There is a parameter in the local comparison function areVerticesEqual which enables the associated checks but it is always set to false.

The proposed change replaces the stateless comparator used in JoinVerticesProcess::ProcessMesh with one that caches the number of UV and color channels in the current mesh. This allows areVerticesEqual to check all relevant vertex attributes without performing unnecessary comparisons.

Copy link
Member

@kimkulling kimkulling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine.

@kimkulling kimkulling merged commit 6a8f169 into assimp:master Jan 17, 2023
@kimkulling
Copy link
Member

Merged, thanks a lot for your contribution.

@kimkulling kimkulling added the Postprocessing Issues regarding the post-processing steps. label Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Postprocessing Issues regarding the post-processing steps.
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants