BPTC Texture Compression: Difference between revisions

From OpenGL Wiki
Jump to navigation Jump to search
(Link to the GL spec, instead of the extension spec.)
(Adding a link to the Khronos data format specification.)
Line 8: Line 8:
'''BPTC Texture Compression''' is the collective name for a pair of compression formats. One of them is for unsigned normalized images, while the other is for floating-point values. They both use 4x4 blocks, and each block in both is 128-bits in size. Unlike [[S3 Texture Compression]], the blocks are taken as byte streams, and thus they are endian-independent.
'''BPTC Texture Compression''' is the collective name for a pair of compression formats. One of them is for unsigned normalized images, while the other is for floating-point values. They both use 4x4 blocks, and each block in both is 128-bits in size. Unlike [[S3 Texture Compression]], the blocks are taken as byte streams, and thus they are endian-independent.


{{note|This page will be an overview on these compression formats; it will not specify exactly how they work. The extension and OpenGL specifications cover those details, and they are quite involved. Specifically, they require a large number of lengthy tables. It's best to get this information directly from the specification ({{glref45|Appendix C.2|641}}), to avoid them being erroneously reproduced here.}}
{{note|This page will be an overview on these compression formats; it will not specify exactly how they work. The extension and OpenGL specifications cover those details, and they are quite involved. Specifically, they require a large number of lengthy tables. It's best to get this information directly from the specification ({{glref45|Appendix C.2|641}}) or the [https://www.khronos.org/registry/DataFormat/specs/1.1/dataformat.1.1.html#BPTC Khronos Data Format specification], to avoid them being erroneously reproduced here.}}


=== Unsigned normalized ===
=== Unsigned normalized ===
Line 19: Line 19:


=== Floating point ===
=== Floating point ===
{{stub}}


== See also ==
* [https://www.khronos.org/registry/DataFormat/specs/1.1/dataformat.1.1.html#BPTC Khronos Data Format Specification for BPTC formats]


[[Category:Texture Compression]]
[[Category:Texture Compression]]

Revision as of 02:39, 1 July 2017

BPTC Texture Compression
Core in version 4.6
Core since version 4.2
ARB extension ARB_texture_compression_bptc

BPTC Texture Compression is the collective name for a pair of compression formats. One of them is for unsigned normalized images, while the other is for floating-point values. They both use 4x4 blocks, and each block in both is 128-bits in size. Unlike S3 Texture Compression, the blocks are taken as byte streams, and thus they are endian-independent.

Note: This page will be an overview on these compression formats; it will not specify exactly how they work. The extension and OpenGL specifications cover those details, and they are quite involved. Specifically, they require a large number of lengthy tables. It's best to get this information directly from the specification (OpenGL 4.5, Appendix C.2, page 641) or the Khronos Data Format specification, to avoid them being erroneously reproduced here.

Unsigned normalized

The unsigned normalized formats come in two flavors that are mathematically equivalent: one for linear RGB values (GL_COMPRESSED_RGBA_BPTC_UNORM) and one for sRGB values(GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM). They both have an alpha channel as well.

Both this format and S3TC work based on gradients: defining a block based on a pair of colors and then linearly interpolated values between them. The general difference between this format and the nearest S3TC size equivalent (GL_COMPRESSED_RGBA_S3TC_DXT5_EXT) is that this BPTC format allows for blocks to contain multiple gradients for different color channels. This is similar to how DXT5 has a block for RGB and a separate block for alpha. But BPTC uses a much more flexible mechanism that allows different groups of channels to be used.

Each block has a selector that picks between one of 7 different modes. The different modes represent how many channel gradients there are and which channels they map to.

Floating point

See also