S3TC - DXT

S3TC, also known as DXT, was the first compressed format to gain broad adoption, due to its inclusion in DirectX 6.0 and OpenGL 1.3 in 1998 and 2001, respectively

DXT1 normally provides 4 shades of color with no alpha but if the 2 565 colors are reversed, there are 3 colors and transparency. Transparency is not filtered. (DXT5 alpha is filtered)

DXT3 is not a "good choice" for "sharp alpha." If alpha is really just on or off, use DXT1, beacuse it's smaller. If alpha is more than that, use DXT5, which approximately always has better quality (3 bit palette between two 8-bit values) than DXT3 (4-bit direct values).

Variants

RGTC and LATC use DXT but to store two channel only:

  • latc: rgba=(x,x,x,y)

  • rgtc as rgba=(x,y,0,1)

3DC use DXT compression

ATITC/ATC use a very similar compression

For potential better results

Obviously these format are only supported on GPU that support S3TC/DXT

YCoCg-DXT Compression

CRN Crunch format

 ./crunch -file image.png -fileformat dds -DXT5 -yflip

RGBV format

Aka WayForward's .anb format

Better result than DXT by using an additional channel

This is a variant of RGBM using two DXT1 blocks in order to get free alpha mask

Input

  • https://github.com/pasu/squishjs

  • https://github.com/svn2github/libsquish

  • http://trac.openscenegraph.org/projects/osg/browser/OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgPlugins/dds/ReaderWriterDDS.cpp

Output

See [Texture format](Texture format)

convert image_rgba.png -format dds -define dds:compression=dxt5 -define dds:cluster-fit=true -define dds:mipmaps=0 image_rgba_dxt5.dds

Last updated

Was this helpful?