Skip to content

Upstream bevy_basisu_loader / use basisu_c_sys #23597

@beicause

Description

@beicause

What problem does this solve or what need does it fill?

See also #23358
I believe basisu is still worth better support. In the snapshot tests of bevy_basisu_loader, a BC7 skybox with mipmaps is 32 MB (though it's not zstd compressed), while ASTC 8x8 and XUASTC 8x8 is only 8 MB and 5.3 MB. See also The-Three-Generations-of-GPU-Texture-Distribution
Pros and cons of different texture formats I can think of:

Format Pros Cons
Common image formats (png, webp) Small file size. Easy to view, port, and edit Slow loading. VRAM and Bandwidth aren't reduced
Native GPU formats Fastest loading speed, no decoding. Reduced VRAM and bandwidth Size on disk is large1. Requires separate versions for different platforms
Basis Universal formats Small file size. Reduced VRAM and bandwidth. Portable Slow loading2. Requires basis universal dependency3

What solution would you like?

Upstream bevy_basisu_loader.

What alternative(s) have you considered?

No.

Footnotes

  1. ASTC with large block size is much smaller than BCn but isn't always available on desktop. There's also RDO which can reduce compressed size.

  2. No transcoding if basisu textures are standard ASTC and platform support it. Caching results to disk during installing/first loading is a solution, too.

  3. Needs C++ binding + wasm workaround. A pure Rust transcoder is a huge amount of work probably no one can finish it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-AssetsLoad files from disk to use for things like images, models, and soundsA-RenderingDrawing game state to the screenC-FeatureA new feature, making something new possibleS-Waiting-on-SMEThis is currently waiting for an SME to resolve something controversialX-Needs-SMEThis type of work requires an SME to approve it.

    Type

    No type

    Projects

    Status

    Needs SME Triage

    Status

    Needs SME Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions