Compressed Image Formats
The compressed texture formats used by Vulkan are described in the specifically identified sections of the Khronos Data Format Specification, version 1.3.
Unless otherwise described, the quantities encoded in these compressed formats are treated as normalized, unsigned values.
Those formats listed as sRGB-encoded have in-memory representations of
R, G and B components which are nonlinearly-encoded as
R', G', and B'; any alpha component is unchanged.
As part of filtering, the nonlinear R', G', and B' values
are converted to linear R, G, and B components; any alpha
component is unchanged.
The conversion between linear and nonlinear encoding is performed as
described in the KHR_DF_TRANSFER_SRGB
section of the Khronos Data Format
Specification.
Block-Compressed Image Formats
BC1, BC2 and BC3 formats are described in S3TC Compressed Texture Image Formats
chapter of the Khronos Data Format Specification.
BC4 and BC5 are described in the RGTC Compressed Texture Image Formats
chapter.
BC6H and BC7 are described in the BPTC Compressed Texture Image Formats
chapter.
VkFormat | Khronos Data Format Specification description |
---|---|
Formats described in the | |
BC1 with no alpha | |
BC1 with no alpha, sRGB-encoded | |
BC1 with alpha | |
BC1 with alpha, sRGB-encoded | |
BC2 | |
BC2, sRGB-encoded | |
BC3 | |
BC3, sRGB-encoded | |
Formats described in the | |
BC4 unsigned | |
BC4 signed | |
BC5 unsigned | |
BC5 signed | |
Formats described in the | |
BC6H (unsigned version) | |
BC6H (signed version) | |
BC7 | |
BC7, sRGB-encoded |
ETC Compressed Image Formats
The following formats are described in the ETC2 Compressed Texture Image Formats
chapter of the Khronos Data Format Specification.
VkFormat | Khronos Data Format Specification description |
---|---|
RGB ETC2 | |
RGB ETC2 with sRGB encoding | |
RGB ETC2 with punch-through alpha | |
RGB ETC2 with punch-through alpha and sRGB | |
RGBA ETC2 | |
RGBA ETC2 with sRGB encoding | |
Unsigned R11 EAC | |
Signed R11 EAC | |
Unsigned RG11 EAC | |
Signed RG11 EAC |
ASTC Compressed Image Formats
ASTC formats are described in the ASTC Compressed Texture Image Formats
chapter of the Khronos Data Format Specification.
VkFormat | Compressed texel block dimensions | Requested mode |
---|---|---|
Linear LDR | ||
sRGB | ||
Linear LDR | ||
sRGB | ||
Linear LDR | ||
sRGB | ||
Linear LDR | ||
sRGB | ||
Linear LDR | ||
sRGB | ||
Linear LDR | ||
sRGB | ||
Linear LDR | ||
sRGB | ||
Linear LDR | ||
sRGB | ||
Linear LDR | ||
sRGB | ||
Linear LDR | ||
sRGB | ||
Linear LDR | ||
sRGB | ||
Linear LDR | ||
sRGB | ||
Linear LDR | ||
sRGB | ||
Linear LDR | ||
sRGB | ||
HDR | ||
HDR | ||
HDR | ||
HDR | ||
HDR | ||
HDR | ||
HDR | ||
HDR | ||
HDR | ||
HDR | ||
HDR | ||
HDR | ||
HDR | ||
HDR |
ASTC textures containing HDR block encodings should be passed to the API using an ASTC SFLOAT texture format.
An HDR block in a texture passed using a LDR UNORM format will return the appropriate ASTC error color if the implementation supports only the ASTC LDR profile, but may result in either the error color or a decompressed HDR color if the implementation supports HDR decoding.
ASTC Decode Mode
If the VK_EXT_astc_decode_mode
extension is enabled, the decode mode is
determined as follows:
VkFormat | Decoding mode |
---|---|
decode_float16 | |
decode_unorm8 | |
decode_rgb9e5 |
Otherwise, the ASTC decode mode is decode_float16.
Note that an implementation may use HDR mode when linear LDR mode is requested unless the decode mode is decode_unorm8.
PVRTC Compressed Image Formats
PVRTC formats are described in the PVRTC Compressed Texture Image Formats
chapter of the Khronos Data Format Specification.
VkFormat | Compressed texel block dimensions | sRGB-encoded |
---|---|---|
No | ||
No | ||
No | ||
No | ||
Yes | ||
Yes | ||
Yes | ||
Yes |