Texture Size, Color Space, and Compression
Tutorial
·
intermediate
·
+0XP
·
15 mins
·
(145)
Unity Technologies

In this tutorial, we identify how choosing the correct texture size, color space, and compression can lead to better performance.
Languages available:
1. Overview
Texture size, color space, and compression can all have an impact on the performance of your game.
A good practice is to create Textures that are large enough to achieve the quality you’re looking for, but no bigger. It’s also best to use a large-size Texture atlas that contains several Textures that are shared between many Meshes.
2. Texture Size
Textures can be different sizes. Reducing the size of Textures that require less detail will help reduce bandwidth. For example, a diffuse Texture can be set to 1024x1024 and the related roughness/metallic map can be set to 512x512.
Do your best to selectively reduce the Texture size and always check to see if any visuals have been degraded afterwards.
3. Texture Color Space
Most texturing software, such as Adobe Photoshop and Substance Painter, works with and exports Textures using the sRGB color space.
We recommend that you use diffuse Textures in the sRGB color space. Textures that are not processed as color must not be in the sRGB color space. Examples of these Textures include metallic, roughness, and normal maps, since maps are used as data and not color. Using sRGB in these maps will result in the wrong visual on the Material.
Note: Make sure the sRGB (color Texture) setting in the Inspector window doesn’t have checks next to roughness, specular, normal maps, or similar items.
The following screenshot shows what happens when sRGB is incorrectly applied to a Texture:

4. Texture Compression
Texture compression is an image compression that is applied to reduce Texture data size while maintaining visual quality.
It’s common to export Textures using formats like TGA or PNG. While these formats are more convenient to use and major image software programs support them, they must not be used in final rendering because they are slower to access and sample compared to specialized image formats. For Android, there are several options, like Adaptive Scalable Texture Compression (ASTC), Ericsson Texture Compression (ETC) 1, or ETC2.
We recommend that you use the ASTC technology that Arm created:
- ASTC provides better quality than ETC without requiring more memory.
- ASTC takes longer to encode than ETC and can make the game packaging process take more time. If this is an issue, then it is better to use ASTC on the final packaging of the game.
- ASTC allows for greater quality control by allowing the block size to be set. While there’s no single best default for block size, setting it to 5x5 or 6x6 is a good starting point.
Sometimes it might be preferable to use ETC for development if you have to quickly deploy your game. You can use ASTC with fast compression settings to get around the increase in deployment time. When encoding, there is a trade off between speed, quality, and size. For the final build, ASTC is the best option in terms of visual quality and file size.
Unity handles Texture compression when you package the game, but you can choose between ASTC and ETC..
The following screenshot shows where to select ASTC when building an Android package in Unity:

The following image shows the difference in quality and file size when using ETC and ASTC compression:

5. Conclusion
2D Assets can have a huge impact on the performance of mobile applications. It’s important to consider size, color space, and compression details when working with Textures. In the next tutorial, we’ll discuss the benefits of using Texture atlases to pack images together.