Open fire opened 2 years ago
Working in the https://github.com/V-Sekai/godot/tree/gltfpack-basisu branch.
// https://github.com/V-Sekai/godot/commit/3adfbf559adddf5d5a991ea7a2c03a97f6cc3e65
// This takes a image and outputs a ktx2. Easy.
Vector<uint8_t> (*Image::basis_universal_ktx2_packer_ptr)(const Ref<Image> &, Image::UsedChannels) = nullptr;
// This takes a image and outputs an image which is internally a .basis. Stuck here.
Ref<Resource> (*Image::basis_universal_ktx2_unpacker_ptr)(const uint8_t *, int) = nullptr;
How do we take a ktx2 and get a basis file with all the mipmaps, layers, and supporting both etc1s and uastc?
Is the KTX2 uncompressed? That should be relatively easy, although we would need to write a KTX2 reader. (Which isn't hard, but any parser involves security concerns.)
Is a KTX2 reader something that fits this library for purpose of png -> ktx2, and ktx2 -> basis. Not sure where else to fit it. Other devs spent some time converting to basis.
There is already a widely supported KHR_texture_basisu
extension for glTF which uses KTX v2 format files. It seems like https://github.com/V-Sekai/godot/tree/gltfpack-basisu is out-of-date or incorrect.
Yes, its incorrect, thats the whole point of this bug. I can either implement support or close.
Or you can use a non-broken gltf pack tool.
We can compress images into ktx2.
How do we take a ktx2 and get a basis file with all the mipmaps, layers, and supporting both etc1s and uastc?
Trying to implement basisu in gltf where I convert a gltf ktx2 basisu to the internal storage of a .basis instead of directly to bptc, astc, or dxt5.