Open zellski opened 5 years ago
Technically, JSON has only double-precision floats. So deserializing truncated values would yield different output unless loader also uses single-precision floats internally.
I think the FBX SDK is largely concerned with doubles. I'm not sure why FBX2glTF truncates everything to single precision -- if there's any reason I should maintain that. I don't expect this tool to be run on tiny memory-strapped machines...
I guess the question is whether to turn the whole FBX2glTF pipeline doubles-friendly -- which would be fine for 99% of use cases, but could cause memory issues for really gigantic models -- or, if we have to truncate at some point, it's more honest to output with only as much precision as we can still claim to have.
Given that we store everything in RawModel as floats, we should not then output them as if they had meaningful double-precision data. We just end up with deceptive ugliness like
We should investigate explicitly serialising to JSON in single precision.