Squisher
What?
squisher
is a program that takes a glTF or .glb file with PNG/JPG textures and produces a .glb file where the textures have been replaced with ASTC compressed ktx2 files, explicitly breaking the glTF spec: source.
If you want your assets to use optimised textures but don't want to pay the runtime transcoding cost of KHR_texture_basisu, this tool is for you.
Why?
Because hotham works best with compressed textures, and doing this stuff by hand is time consuming. It takes literal minutes. And we all know that a watched pot never boils.
How?
Running squisher
is easy:
cargo run your_file.gltf
OR
cargo run your_file.glb
Which will produce your_file_squished.glb
.
Requirements
note: this part is currently a lie, paths to these tools is hardcoded
In addition to Rust, you must have the following programs installed. Tell squisher
where they are by setting the environment variables ASTC_PATH
and KTX2KTK2_PATH
respectively:
- arm's astc-encoder
- Khronos' ktx2ktxt2