KTX-Software icon indicating copy to clipboard operation
KTX-Software copied to clipboard

Tighten swizzling with supercompression

Open lexaknyazev opened this issue 6 years ago • 1 comments

KTX2 files may have swizzling metadata that are expected to be applied on rendering.

KTX software behavior on processing files with such metadata via Basis should be documented and preferably configurable.

Swizzling like rabb may yield drastically different error metrics after supercompression. So there should be two options:

  • compress values as-is, leave swizzling metadata in the supercompressed KTX file;
  • apply swizzling before invoking Basis compressor and remove swizzling metadata from the compressed KTX file.

Transcoding Basis slices to BC4 and BC5 formats may imply additional internal swizzling, so there should be accurate documentation on that.

lexaknyazev avatar Jul 20 '19 13:07 lexaknyazev

Swizzling like rabb may yield drastically different error metrics after supercompression

Don't you mean after block compression (i.e. after ETC1S or UASTC encoding? Supercompression is lossless. And therefore isn't this an issue for any block-compressed format? Should we recommend not using swizzle with block-compressed formats?

KTX software currently applies swizzle prior to encoding a ktxTexture2 to BasisLZ/ETC1S or UASTC and removes the swizzle from the texture.

MarkCallow avatar Jun 13 '20 00:06 MarkCallow