UnityGLTF icon indicating copy to clipboard operation
UnityGLTF copied to clipboard

Fix min/max mismatch errors from ExportSparseAccessor

Open seokyeol opened this issue 1 year ago • 1 comments

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.

seokyeol avatar Jun 18 '24 09:06 seokyeol

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 18 '24 09:06 CLAassistant