Skip to content

Conversation

@elalish
Copy link
Contributor

@elalish elalish commented Mar 11, 2020

This fixes a bug that was reported through a different channel. I had actually noticed before getting occasional triangles that would either be completely black or covered with random black noise, and traced it down to triangles with degenerate UV coordinates (different vertices with the same UV coords). It will only manifest if tangent vectors are not supplied.

I had assumed at first this was a problem with the authoring software, but it turns out this happens pretty often during compression by quantization, as happens with DRACO, etc. The problem is just NaNs creeping into the normal vector computation, so I've fixed that here.

@elalish elalish requested a review from cdata March 11, 2020 19:24
@elalish elalish self-assigned this Mar 11, 2020
Copy link
Contributor

@cdata cdata left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@elalish elalish merged commit 2ebf335 into master Mar 11, 2020
@elalish elalish deleted the degenerateUVs branch March 11, 2020 20:03
elalish added a commit that referenced this pull request Apr 14, 2020
elalish added a commit that referenced this pull request Apr 14, 2020
@elalish elalish added this to the v0.10.0 milestone Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants