Using ASTC for game assets

As a developer, you must consider several things when compressing game assets. These considerations depend on how the texture is used, and the required image quality.

Choosing a suitable bitrate

Choosing a higher or a lower bitrate lets you trade image quality against data size to obtain the optimum balance for your assets.

The following image shows how different bit rates affect image quality:

A good practice is to split all your texture assets into quality categories based on their distance to the viewer or general visibility and importance. For example, you can split your assets into three categories: high, medium, and low. Instead of adjusting the bitrate for each individual texture, experiment with a few textures from each category and determine the best bitrate for each category. You can then use these bitrates to batch-compress the rest of the textures in each category.

For the majority of color textures using a block size between 6x6 (3.56bpp) and 8x8 (2bpp) gives an acceptable quality with efficient memory size and bandwidth.

For 2D user interface elements, where image quality can be more important, a smaller block size such as 4x4 or 5x5 might be more appropriate.

Normal maps need a higher bitrate than color data, so we would recommend using the -normal mode to only store two components and a 5x5 block size.

sRGB

ASTC supports non-linear sRGB color space conversion at both compression and decompression time.

To keep images in sRGB color space until the point that they are used:

  1. Compress images in the usual way.
  2. When loading images, use the sRGB texture formats instead of the regular texture formats.

    The sRGB texture formats contain SRGB8_ALPHA8 in the name, for example, COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR. There is an sRGB equivalent for every RGBA format.

Previous Next