Use gltf-report to diagnose your GLB models and textures.
Install gltf-transform
npm install --global @gltf-transform/cli
Transform textures found in a GLB model to KTX2 format wit 5EA3 h gltf-transform:
gltf-transform uastc [INPUT] [OUTPUT]
Optimize the whole GLB and transform textures to KTX2 format with gltf-transform:
gltf-transform optimize [INPUT] [OUTPUT] --texture-compress ktx2
Install KTX-Software.
KTX Creation with toktx:
toktx --t2 --genmipmap --upper_left_maps_to_s0t0 public/images/cards_atlas.ktx2 public/images/cards_atlas.jpg
Encode and compress KTX2 texture to UASTC with ktxsc:
ktxsc --encode uastc --zcmp 19 -o public/images/cards_atlas_uastc.ktx2 public/images/cards_atlas.ktx2
Use GLB Optimizer, an online tool leveraging glt-transform CLI to optimize GLB models without using the command line.