Replace basis-universal-rs with basisu_c_sys to improve basis universal support#23672
Replace basis-universal-rs with basisu_c_sys to improve basis universal support#23672beicause wants to merge 17 commits intobevyengine:mainfrom
basis-universal-rs with basisu_c_sys to improve basis universal support#23672Conversation
|
Another option is checking "KTXwriter" key in ktx2 file so that we can support basisu in Update: Done. |
|
This introduces a dependency on How does this PR impact basisu support in Bevy? ex: does it work on wasm? The file extension required to use basisu is changed by this PR and There don't seem to be any usage examples or tests. How should someone determine if this code works now and in the future? |
|
basisu_c_sys depends on the cpp library and the wasm_bindgen bindings to emscripten's prebuilt wasm for web support, so yes. It includes transcoding and encoding tests in my repository. I expect to maintain it, but I'm willing to transfer it to the bevy organization if bevy wants. The lack of .basis support is because it's relatively outdated and not supported by the C API. |
basis-universal-rs with basisu_c_sys to improve basis universal support
|
@cwfitzgerald is working on a texture compression library, he may have something to say |
|
I don't have much too much of substance to add. I think having up to date bindings would be good and moving to standardized ktx2 files is an improvement over custom basis files. I do plan on adding basis support to ctt, likely through this set of crates, which @JMS55 will integrate with the bevy stack, but that's still a bit out and I'm not sure how that would relate to this PR as this seems to also have tools at runtime. |
|
Note: I've marked this as particularly controversial because it swaps our dependencies out. This is a classic supply chain threat model, so we need to have a careful plan here. @beicause, this isn't personal to you; you've done fantastic work elsewhere and are rapidly building trust. It's just a matter of policy and best practices. |
I know #23567 and from what I saw it's a processor for native gpu compressed formats. I think basisu should be a separate processor as it has different encode params and needs runtime transcoding and
+: I have worked on the basisu binding several months ago and |
Objective
Closes #23597
Solution
CompressedImageFormats, and ktx2 loader.basis-universalcrate and.basisformat support frombevy_image.CompressedImageSaverwithBasisuSaver/BasisUniversalProcessorPluginasset processor. Enablebasis_universalfeature to enable loading support. Enablebasis_universal_saverfeature to enable saver and asset processor.Testing
basisu_c_sysis tested in https://github.com/beicause/bevy_basisu_loader.Run with
--features basis_universal_saver,asset_processor: