donmccurdy/glTF-Transform

Missing 'normalized' flag in Draco encoder calls

donmccurdy opened this issue · 2 comments

When compressing glTF assets with Draco, some data about each attribute is encoded both in the glTF accessor, and in the Draco-encoded buffer. Currently there's no way to tell the Draco encoder that a vertex attribute is normalized, so the normalized flag will be missing from the encoded buffer.

Client implementations may read vertex attribute data from either the accessor or the buffer — they're supposed to match — and so clients reading from the buffer may not know the attribute is normalized. three.js currently uses only the accessor data, so this is not an issue for .gltf/.glb files in three.js.

The babylon.js devs tracked the issue down to the Draco library itself, so the problem likely occurs in all current Draco encoders — glTF Transform, glTF Pipeline, Blender, and perhaps others. Once the upstream issue in Draco is resolved, we should be sure to mark normalized attributes in the Draco encoder here.

Context:

cc @pfcDorn maybe that's related to some of the Draco issues you were seeing

Just as FYI, there was also a bug related to bit depth for quantization from version v3.4.1, fixed in v3.7.0.