KTXLoader quirks and ASTC support
See original GitHub issueI’m delighted to see built-in compressed texture support in 6.0.0, big thanks!
Using KTXLoader I noticed that:
- After load the
resource.texture
field is not populated which breaks atlases (but is fixable with loader middleware) - mipmaps are not being used, even if they are present. I suppose this line is at the root of this: https://github.com/pixijs/pixi.js/blob/dev/packages/compressed-textures/src/loaders/registerCompressedTextures.ts#L25
MipMaps were lost on BASIS as well, but I suppose that’s a different issue. (Sadly the transcoder is too heavy for us)
Additionally, I’d love to see ASTC support, since it’s quite widely available and has good tooling around it.
Let me know if there’s anything I can help you with.
Environment
pixi.js
version: 6.0.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (9 by maintainers)
Top Results From Across the Web
KTXLoader quirks and ASTC support · Issue #7329 · pixijs ...
After load the resource.texture field is not populated which breaks atlases (but is fixable with loader middleware); mipmaps are not being used, ...
Read more >ASTC Texture Compression - OpenGL Wiki
Most compressed formats offer a fairly limited array of color channel support. BPTC's normalized integer support provides 4 channels, always.
Read more >a review and compute shader decoders – part 3/3
As far as I know, ASTC succeeds here, given a sufficiently sophisticated encoder. To supplant every format, you'd need to support these features ......
Read more >KTX2Loader – three.js docs
The loader supports Basis Universal GPU textures, which can be quickly transcoded to a wide variety of GPU texture compression formats.
Read more >Using ASTC Texture Compression for Game Assets
One last note: ASTC compression takes time for best results. ... In addition, ASTC offers support for 1-4 channels, including full alpha RGBA,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There are a few issues here and I just want to clarify a little:
texture
objectMy PR fixes the first issue. Will need help with the other issues here.
@SukantPal Enabling MipMaps works like a charm and allows me to ship 🚢 Thanks! ✨ The KTX format allows to specify only a subset of mip levels, so I see where this can go wrong… Especially with Pixi’s 2D focus leaving mips off by default is probably the better solution for now. Maybe we can document this somewhere? About that ASTC support, is there anything I can do to help with? It’s supported on modern Apple devices and quality-wise beats PVRTC by a mile.