VAT deserialization for half float textures does not work

Repro: Babylon.js Playground

Toggle toBakeHalfFloat to see the difference. Eyeballing the source shows loadBakedVertexDataFromObject returning Float32Array for half float textures.

Tested simple fix (right at bottom of PG), need a dev to confirm and I can submit a PR or anyone else free can as well.

Cheers!

Thanks for the repro and suggested fix! You’re right: deserialization always creates a Float32Array, which reinterprets the half-float bytes and halves the element count.

I’ve opened a fix in PR #19186 that preserves the precision during serialization and restores a Uint16Array for half-float data. Existing full-float data remains compatible.

One small detail: pass vertexData directly to EncodeArrayBufferToBase64, rather than vertexData.buffer, so subarray offsets and lengths are respected.

Thank you very much! Tested, all wai now. Closing!