-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
EXT_mesh_gpu_instancing was just merged in #1691 but it specifies quaternions as FLOAT_VEC4:
For "rotation" the values are quaternion FLOAT_VEC4's in the order (x, y, z, w), where w is the scalar.
This is problematic for transmission size reasons. There's a substantial difference in size between a floating-point vec4 quaternion (16 bytes) and signed-normalized 16-bit quaternion (8 bytes). In the basic case I'd expect a typical instance stream to contain 12-byte positions and 16-byte rotations right now (assuming no scaling) which adds up to 28 bytes, vs 20 bytes for signed-normalized representation.
Additionally using #1702 the quantized quaternions can be compressed further with more efficiency compared to non-quantized quaternions.
gltfpack currently only implements quantized storage. Babylon.JS already supports quantized inputs, Three.JS can trivially do so as discussed on the issue.
I'd like to ask that the spec be amended to change the rotation requirements.