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

Runtime mipmap generation #18037

Open
jf908 opened this issue Feb 25, 2025 · 0 comments
Open

Runtime mipmap generation #18037

jf908 opened this issue Feb 25, 2025 · 0 comments
Labels
A-Assets Load files from disk to use for things like images, models, and sounds A-Rendering Drawing game state to the screen C-Feature A new feature, making something new possible X-Blessed Has a large architectural impact or tradeoffs, but the design has been endorsed by decision makers

Comments

@jf908
Copy link
Contributor

jf908 commented Feb 25, 2025

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

Textures show aliasing artifacts if they are not accompanied with mipmaps when shown at smaller sizes than their original resolution, which is particularly noticeable in 3D.

Currently, Bevy "technically" supports generating mipmaps at runtime using the asset processor but it comes with some drawbacks:

  • The asset processor is off by default.
  • You have to enable the basis-universal feature and output to the ktx2 format.
  • The textures have to be saved on your file system (which excludes dynamically generated or loaded textures).
  • Doesn't work on textures which are modified at runtime.
  • Doesn't work for textures embedded inside glTF models.
  • Doesn't work on wasm because AssetProcessor is unsupported on single-threaded/wasm and basis-universal doesn't compile (easily).

What solution would you like?

I think that most of these issues were planned to be solved by improvements to asset processing but it would require a nontrivial amount of work to get there. In the meantime, perhaps automatically generating mipmaps would supplement these issues?

What alternative(s) have you considered?

Additional context

@jf908 jf908 added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Feb 25, 2025
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen A-Assets Load files from disk to use for things like images, models, and sounds X-Blessed Has a large architectural impact or tradeoffs, but the design has been endorsed by decision makers and removed S-Needs-Triage This issue needs to be labelled labels Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds A-Rendering Drawing game state to the screen C-Feature A new feature, making something new possible X-Blessed Has a large architectural impact or tradeoffs, but the design has been endorsed by decision makers
Projects
None yet
Development

No branches or pull requests

2 participants