# VAT deserialization for half float textures does not work

**URL:** <https://forum.babylonjs.com/t/vat-deserialization-for-half-float-textures-does-not-work/64864>\
**Category:** Questions\
**Created:** [November 18, 2026, 6:17am UTC](https://forum.babylonjs.com/t/vat-deserialization-for-half-float-textures-does-not-work/64864 "2026-11-18T06:17:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phaselock](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@phaselock](https://forum.babylonjs.com/u/phaselock)\
**Post date:** [November 18, 2026, 6:17am UTC](https://forum.babylonjs.com/t/vat-deserialization-for-half-float-textures-does-not-work/64864/1 "2026-11-18T06:17:32Z")

</div>

Repro: [Babylon.js Playground](https://playground.babylonjs.com/#WVXBMV)

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!

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [November 18, 2026, 1:37pm UTC](https://forum.babylonjs.com/t/vat-deserialization-for-half-float-textures-does-not-work/64864/2 "2026-11-18T13:37:08Z")

</div>

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](https://github.com/BabylonJS/Babylon.js/pull/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.

---

<div class="post-metadata">

**Author:** ![phaselock](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@phaselock](https://forum.babylonjs.com/u/phaselock)\
**Post date:** [November 26, 2026, 2:22am UTC](https://forum.babylonjs.com/t/vat-deserialization-for-half-float-textures-does-not-work/64864/4 "2026-11-26T02:22:34Z")

</div>

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