Description
What problem does this solve or what need does it fill?
When a gltf file is loaded that uses the KHR_texture_basisu
extension, bevy fails to load the asset with a KHR_texture_basisu
is not supported error.
What solution would you like?
Bevy should load the file.
What alternative(s) have you considered?
None
Additional context
This error was surprising to me because there is a sample gltf file that uses ktx2 texture files but it turns out this file has been altered so that it can be loaded in bevy.
By default, gltf files only support jpg and png images but there are official extensions for ktx2, webp, and dds. Bevy supports loading image of those types but they are specified in gltf files in a different way, explained here, to allow for jpg/png fallbacks.
As far I could tell, gltf-rs does not support those custom image extensions and will error if they are required of the gltf file but if gltf
is compiled with the allow_empty_texture
feature, it would be somewhat simple for bevy to just read the json and load the correct path.