KhronosGroup / KhronosGroup/KTX-Specification

Compressing an entire level of mip levels

Open
#136 21 comments 0 reactions 0 assignees View on GitHub
Dominant language
CSS
Stars
81
Forks
16
PR merge metrics
No merged PRs in 30d

Description

KTX and KTX2 store mips at levels (reversed from one another). For arrays, cubes, etc the spec language of mip level and a level of mips levels gets a bit conflated.

Supercompression of individual mips seems overkill at the smaller mip levels, and necessary at the larger mip levels Is there any possibility to have compression of an entire level of mip levels? For a cube or cube array, I'd want to decompress 6 faces at a time, since the texture is useless without all the data. For a 3D volume, I need an entire level before it can be displayed.
For 1D arrays, there are no mips, but I may want supercompress all levels in one compressor and then copy out the results from a single decompress. I know Basis can also optimize blocks across mip levels, and maybe across a level of mips.

Even for the basic 2D with mips case, I'm thinking of wanting to unpack a compressed packed mip tail for sparse textures, but not wanting to hit the decompressor so much. With hardware decompressors, I could see repeatedly sending small mips as performance prohibitive. I also thought with KTX1, the idea was to upload the entire level in one upload call (or copy to a buffer).

Also if a file indicated that only levels were supercompressed, you'd basically just need the same mip count setup as KTX1 but with the compressed sizes vs. uncompressed. Once uncompressed, the offset into the level is the same as with KTX1. That would save storing the compressed/uncompressed sizes for every mip level.

Contributor guide

Open the contributing guide

Research direction

No file, test, or implementation entry point is identified in the issue. Begin by reviewing the KTX and KTX2 specification sections covering mip levels and supercompression, then determine whether grouped-level compression can be specified consistently for arrays, cubes, volumes, and mip tails; done requires an agreed specification design and corresponding updates to the format documentation.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.