example code for ktx2 compression #252
-
Hello,
could you provide some example code of how it should be done? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Several tools for converting textures to https://github.com/KhronosGroup/3D-Formats-Guidelines/blob/main/KTXArtistGuide.md The glTF-Transform CLI is one of them, and you can find my KTX conversion code in the repo as part of the CLI. Note that it relies on having KTX-Software installed to the machine, providing the If you need plain JavaScript and/or WASM, the basis_universal repository recently added a WASM KTX2 encoder, but I haven't worked with it yet: https://github.com/BinomialLLC/basis_universal/blob/master/webgl/ktx2_encode_test/index.html |
Beta Was this translation helpful? Give feedback.
Several tools for converting textures to
.ktx2
are discussed here:https://github.com/KhronosGroup/3D-Formats-Guidelines/blob/main/KTXArtistGuide.md
The glTF-Transform CLI is one of them, and you can find my KTX conversion code in the repo as part of the CLI. Note that it relies on having KTX-Software installed to the machine, providing the
toktx
CLI program, and isn't a plain JavaScript solution.If you need plain JavaScript and/or WASM, the basis_universal repository recently added a WASM KTX2 encoder, but I haven't worked with it yet: https://github.com/BinomialLLC/basis_universal/blob/master/webgl/ktx2_encode_test/index.html