Skip to content

Conversation

seokyeol
Copy link

When exporting sparse accessors through the ExportAccessors class, UnityGLTF currently uses the == operator to compare between baseData and data. However, this operator determines approximate equality rather than exact equality, causing some data values to be considered identical to the base value (usually a zero vector) and thus omitted.

Although this difference might seem negligible, it can result in discrepancies between the values referenced for min/max calculations and those stored in the buffer, potentially causing errors like ACCESSOR_MIN_MISMATCH. To address this issue, I have replaced the == operator with the Equals method to perform precise comparisons.

@CLAassistant
Copy link

CLAassistant commented Jun 18, 2024

CLA assistant check
All committers have signed the CLA.

@seokyeol seokyeol changed the title Fix/sparse accessor min max Fix min/max mismatch errors from ExportSparseAccessor Jun 18, 2024
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