BinomialLLC / basis_universal

Basis Universal GPU Texture Codec
Apache License 2.0
2.72k stars 267 forks source link

Some questions after reading some source codes #348

Open Ttofuuu opened 1 year ago

Ttofuuu commented 1 year ago
  1. When use Rdo-uastc mode to compress, some selector datas(it seems like the texel weight data in astc block?) in uastc blocks would be replaced by other selector datas in previous blocks, and when saving to a .basis file, those uastc blocks would be saved directly in the memory of this .basis file, so that gpu could use this texture by the implied astc decoder inside . However, when it comes to .ktx2 file, zstd would be used to pack the compressed blocks futhermore & loselossly, and then those zstd-compressed texture would be save into a .ktx2 file, which gpu can't decode. Is my thought above right? image
  2. How does etc1s stream be supercompressed? I saw basisu_frontend::compress() make source into etc1s blocks, I don't know why they can be supercompressed after init_etc1_images(). Is there any doc to explain the way to quantize ETC1S endpoints & selectors? This repo is amazing, but i'm too naive to understand every amazing things inside. An astc bit format can beat me easily already.