I like trains and code. This is where they collide.

Compressed Texture Resources

As I am looking into texture compression as a means of reducing bandwidth usage. I am writing my program in rust, so all implementations would be usable in rust in some form.

Information:

Other Names:

  • BCn = S3TC
  • DXT1 = BC1
  • DXT3 = BC2
  • DXT5 = BC3
  • RGTC1 = BC4
  • RGTC2 = BC5
  • BPTC(float) = BC6H
  • BPTC(unorm) = BC7

Bitrate:

  • RGBA8 = 32bpp
  • BC1 = 4bpp (1/8)
  • BC2 = 8bpp (1/4)
  • BC3 = 8bpp (1/4)
  • BC4 = 4bpp (1/8)
  • BC5 = 8bpp (1/4)
  • BC6 = 8bpp (1/4)
  • BC7 = 8bpp (1/4)

Graphite's rules of thumb:

  • If you need no alpha and do not care about texture quality: BC1
  • If you need 1-bit alpha (cutout) and do not care about texture quality: BC1
  • If you need alpha and do not care about texture quality: BC3
  • If you need no alpha and do care about texture quality: BC7
  • If you need 1-bit alpha and do care about texture quality: BC7
  • If you need alpha and do care about texture quality: BC7

Implementations:

  • squish-rs pure rust compression for BC1,2,3. Version of libsquish.
  • bc7enc c++ implemenation of BC1-5,7 encoders/decoders. Apparently very fast.
  • gmrtdxt c++ implementation of a real time encoder for DXT1/5. Small implemenation.
  • stb_dxt.h c header BC1/3 compressor. STB.
  • icbc.h c header simd BC1 compressor.
  • etc2comp c++ based ETC2 compressor
  • astcenc ARM-software astc encoder. Seems to be the only one out there.
  • Mali Texture Compression Tool ARM-software pretty gui for astcenc and an etc2 compressor as well.
  • NVIDIA Texture Tools NVIDIA tool for converting to various BCn and ASTC.
  • bc7e Highly optimized ISPC encoder for BC7.
  • ISPCTextureCompessor ISPC based encoder for BC1, BC3, BC6, BC7, ETC1, and ASTC.