Closed mikedh closed 2 years ago
Each attribute value, not just the starting offset must be aligned to 4-byte boundaries. Scalar uint16
attribute values use only 2 bytes, so they need 2-byte padding (could be achieved via bufferView.byteStride
) to conform.
Ah that clarifies it, thanks!
I've been trying to get an exporter to pass the validator under all circumstances, and I noticed that exports with a custom
uint16
andint16
vertex attribute fail the validator with the following:The confusing part to me is that:
byteOffset % 4
is zerobyteLength % 4
is also zeroHere's a prettier formatted copy of the JSON header: https://gist.github.com/mikedh/82522310b1fc403efaa08c3dc4579203 Here's the zipped minimal GLB file: cust16.glb.zip
Thanks for the great project!