meshoptimizer icon indicating copy to clipboard operation
meshoptimizer copied to clipboard

gltfpack: EXT_texture_webp support

Open kzhsw opened this issue 2 years ago • 1 comments
trafficstars

Spec here.

Model before: webp_demo.zip

{
"textures":[{"sampler":0,"extensions":{"EXT_texture_webp":{"source":0}}}],
"extensionsUsed":["EXT_texture_webp"],"extensionsRequired":["EXT_texture_webp"]
}

Model after: webp_demo_gltfpack.zip

{
"extensionsUsed":["KHR_mesh_quantization","KHR_texture_transform"],"extensionsRequired":["KHR_mesh_quantization"],
"textures":[{}]
}

kzhsw avatar Feb 09 '23 09:02 kzhsw

A similar thing is the proposal of EXT_texture_avif. Or maybe gltfpack can just keep all unknown extensions of texture for maximum compatibility.

kzhsw avatar Mar 21 '23 02:03 kzhsw

This requires https://github.com/jkuhlmann/cgltf/issues/248; I'm not very interested in implementing this myself and gltfpack can't encode webp images without external dependencies anyway so the best it can do here is to preserve inputs as is, but if the linked issue gets implemented I can take a look at this.

Keeping unknown extensions doesn't work because image files need to be parsed for material transparency optimization.

zeux avatar May 23 '24 05:05 zeux