Skip to content

WhyS2TC

divVerent edited this page Jul 18, 2011 · 5 revisions

Why S2TC?

S2TC is simple

S2TC's format specification is very easy to implement, so it is not hard to make a working compressor or decompressor for it. It is based on Color Cell Compression[1] from 1986, and decoding is done entirely using the methods from there. Encoding is done using a search and refinement method that is derived from the methods described in that paper.

This also makes this format a great platform for learning about texture compression and how to tune a compressor for best quality.

S2TC is fast

S2TC is especially well suited for runtime (on-load) compression of textures, as it is - in low quality settings - way faster than any other texture compressors out there.

S2TC is free

The compressor and decompressor here are licensed under a license that gives you all freedoms you will ever need (namely, the MIT license). In particular, the MIT license allows you to use, copy, modify, merge, publish, distribute, sublicense or sell the software, provided you keep copyright notices intact.

In the unlikely case you need freedoms not covered by the MIT license, feel free to send me a message, and we can negotiate something.

Furthermore, you are free to reimplement S2TC on your own, and can use the format specification on this site as a guide.

The Reference compressor is flexible

The S2TC reference compressor has special modes to support compressing normalmaps, and can set specific color distance metrics both for sRGB and for regular RGB. In many cases, this allows better encoding quality than the colorspace-ignorant existing S3TC compressors out there. This does not mean S2TC is better quality than S3TC - in fact, any S3TC compressor could implement these methods just as well, and get better quality out of it. However, currently no S3TC compressor supports that fully (but AMD Compressonator has some settings in that direction, which allow changing the relative color component weights, but this doesn't suffice to properly encode sRGB or normalmap textures).

References

[1]: Graham Campbell, Thomas A. DeFanti, Jeff Frederiksen, Stephen A. Joyce, and Lawrence A. Leske. 1986. Two bit/pixel full color encoding. SIGGRAPH Comput. Graph. 20, 4 (August 1986), 215-223.

Clone this wiki locally