Difference between revisions of "ASTC Texture Compression"

From OpenGL Wiki
Jump to navigation Jump to search
(Explaining how it obsoletes each format.)
(Linking to Wikipedia. Outlining and changed how the intro paragraphs work.)
Line 4: Line 4:
 
}}
 
}}
  
'''ASTC Texture Compression''' is a form of [[Texture Compression]] that uses variable block sizes, rather than a single fixed size. ASTC is intended to effectively obsolete all prior compressed formats, providing all of the features of the others plus more, all in one format.
+
'''Adaptable Scalable Texture Compression''' ('''ASTC''') is a form of [[Texture Compression]] that uses variable block sizes, rather than a single fixed size. ASTC is designed to effectively obsolete all (or at least most) prior compressed formats by providing all of the features of the others plus more, all in one format.
  
Because of the variable block sizes, it can achieve greater data compression than [[S3 Texture Compression]] by using larger block sizes. But by using smaller block sizes, it can also achieve better visual quality than [[BPTC Texture Compression]]. It can handle both floating-point and integer data, like [[BPTC Texture Compression]]. ASTC has control over how many channels are stored, and it can compress channels individually, providing the functionality of [[Red Green Texture Compression]]. ASTC also supports compressed data in the [[SRGB Image Format|sRGB Colorspace]].
+
; [[S3 Texture Compression]]
 +
: ASTC has better peak signal-to-noise than DXT3/5 at the same block size. But because of ASTC's variable block size, ASTC can also beat DXT1's 4-bits-per-pixel, going as far down as 0.89bpp. At similar bitdepths, ASTC provides better visual quality than DXT1.
 +
; [[BPTC Texture Compression]]
 +
: BPTC provides two features: improved image quality for normalized integer formats and floating-point compression. The HDR profile of ASTC covers the latter, and ASTC's compression for the same bitrate is approximately equivalent to BPTC's normalized formats. ASTC also handles
 +
; [[Red Green Texture Compression]]
 +
: ASTC provides a single-channel and two-channel version, equivalent to RGTC's formats. What is important with RGTC, and the reason to use it rather than regular S3TC, is that the two channels are uncorrelated with one another. The gradient used for one channel has no relation to the gradient used for the other. So two axes that don't visually correlate will compress better for the same bpp.
 +
: ASTC provides both correlated and uncorrelated two-channel compression.
 +
: One feature of RGTC missing from ASTC (directly at least) is support for signed, normalized integer values. This can be approximated however by biasing the data (pre-compression) by 127 (assuming that you properly removed all -128 values from your data), to make it unsigned. Then, in the shader, multiplying the result sampled from the texture by 2 and subtracting 1 to reconstitute the signed value.
  
 
Of course, the downside is that ASTC is not widely available at present. It is available as an OpenGL extension, but it is not core OpenGL functionality.
 
Of course, the downside is that ASTC is not widely available at present. It is available as an OpenGL extension, but it is not core OpenGL functionality.
  
 
{{stub}}
 
{{stub}}
 +
 +
== Variable block sizes ==
 +
 +
 +
 +
== OpenGL image formats ==
 +
 +
 +
 +
 +
== Unavailable features ==
 +
 +
The ASTC format defines additional functionality which has not yet been exposed to OpenGL. Specifically, it has the concept of volumetric compression, where the blocks are 3-dimensional blocks rather than two-dimensional blocks.
 +
 +
== See also ==
 +
* [https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression Wikipedia article on ASTC]
  
 
[[Category:Texture Compression]]
 
[[Category:Texture Compression]]

Revision as of 18:56, 18 May 2015

ASTC Texture Compression
ARB extension KHR_texture_compression_astc_hdr, KHR_texture_compression_astc_ldr

Adaptable Scalable Texture Compression (ASTC) is a form of Texture Compression that uses variable block sizes, rather than a single fixed size. ASTC is designed to effectively obsolete all (or at least most) prior compressed formats by providing all of the features of the others plus more, all in one format.

S3 Texture Compression
ASTC has better peak signal-to-noise than DXT3/5 at the same block size. But because of ASTC's variable block size, ASTC can also beat DXT1's 4-bits-per-pixel, going as far down as 0.89bpp. At similar bitdepths, ASTC provides better visual quality than DXT1.
BPTC Texture Compression
BPTC provides two features: improved image quality for normalized integer formats and floating-point compression. The HDR profile of ASTC covers the latter, and ASTC's compression for the same bitrate is approximately equivalent to BPTC's normalized formats. ASTC also handles
Red Green Texture Compression
ASTC provides a single-channel and two-channel version, equivalent to RGTC's formats. What is important with RGTC, and the reason to use it rather than regular S3TC, is that the two channels are uncorrelated with one another. The gradient used for one channel has no relation to the gradient used for the other. So two axes that don't visually correlate will compress better for the same bpp.
ASTC provides both correlated and uncorrelated two-channel compression.
One feature of RGTC missing from ASTC (directly at least) is support for signed, normalized integer values. This can be approximated however by biasing the data (pre-compression) by 127 (assuming that you properly removed all -128 values from your data), to make it unsigned. Then, in the shader, multiplying the result sampled from the texture by 2 and subtracting 1 to reconstitute the signed value.

Of course, the downside is that ASTC is not widely available at present. It is available as an OpenGL extension, but it is not core OpenGL functionality.

Variable block sizes

OpenGL image formats

Unavailable features

The ASTC format defines additional functionality which has not yet been exposed to OpenGL. Specifically, it has the concept of volumetric compression, where the blocks are 3-dimensional blocks rather than two-dimensional blocks.

See also