Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shrinking wasm for glTF extension support #359

Open
andreasplesch opened this issue Oct 11, 2023 · 1 comment
Open

shrinking wasm for glTF extension support #359

andreasplesch opened this issue Oct 11, 2023 · 1 comment

Comments

@andreasplesch
Copy link

We are exploring supporting the glTF_texture_basisu extensions without requiring heavy wasm files.

The extension requires support for these internal formats:

  • ETC1S with BasisLZ (used for color-perceptual content)
  • UASTC with optional Zstandard compression (used for data content)

Since ASTC seems to be the most widely (chrome/firefox/safari/android/ios) GPU compressed format, we would only target ASTC, and require fallback textures if not available.

https://github.com/BinomialLLC/basis_universal/wiki/How-to-Use-and-Configure-the-Transcoder#shrinking-the-transcoders-compiled-size

provides options to select for compilation:
BASISD_SUPPORT_UASTC
BASISD_SUPPORT_ASTC or BASISD_SUPPORT_ASTC_HIGHER_OPAQUE_QUALITY
plus BASISD_SUPPORT_KTX2_ZSTD to 1

would then suffice ?

Would else would need to be considered ?

@andreasplesch
Copy link
Author

andreasplesch commented Oct 11, 2023

With these options, eg. only ASTC support the wasm shrinks to 260KB which is bit better.
With BASISD_SUPPORT_ASTC_HIGHER_OPAQUE_QUALITY it goes up to 330KB.
Let's see if this is useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant