Texture compression technology has been developed to provide significant enhancements in quality and efficiency offering application developers the required performance and quality at 2bpp and 4bpp resolutions while lowering system memory usage and reducing GPU processing overhead for the low power-driven world of mobile graphics.
Textures are ubiquitous in mobile and desktop graphics. They add a degree of realism to a wide range of applications like games or navigation apps where a combination of factors such as image quality and loading times are vital to smartphone, tablet and portable console users. Typically such content is increasingly pushing for higher quality on higher resolutions in order to raise the overall quality bar. This means computing systems need to have access to the right combination of features, raw graphics and compute performance and software tools to make efficient use of all available resources.
Memory, quality, power, performance: the four horsemen of texture compression
Many mobile applications today can offer desktop quality graphics and therefore most developers have focused on supporting OpenGL ES as the main standard for the embedded market. This implies using detailed textures which require more memory and large data sizes. Compressing textures is a natural choice for developers who understand the requirements of the mobile gaming market.
Limiting power consumption is what has always driven the embedded market. Software developers and hardware engineers should know that memory accesses are the most important cause of battery drain next to keeping the display lit. With PowerVR’s tile-based deferred rendering, Imagination has managed to keep most of the processing on chip and our graphics processing architecture has been optimized right down to the texture decoding level, making sure that we provide the industry’s leading, most popular implementation for texture compression.
Modern computing platforms have shared, unified memory architectures. A multi-core CPU, a multi-threaded GPU and other processing units all compete for the same RAM resources, so memory bandwidth becomes vital for mobile. Texture compression permits smaller texture footprints and therefore the size of transfers from the main memory to the GPU is reduced, allowing rendering or other computing tasks (like doing game physics or image processing with OpenCL ) to complete faster.
Memory storage options for embedded devices are quite limited compared to desktop PCs. Texture compression not only reduces your application’s memory footprint, it also allows you to decrease the amount of storage your game occupies on a smartphone and tablet. As memory and storage sizes are becoming increasingly important, expectations around multi-tasking while gaming have also continued to rise. While a file compression scheme like PNG could often have a lower size, a compressed texture like PVRTC for example will not need to be decompressed to full size while the app is running. Another advantage is that compressed textures can always be compressed further via zipping or other file compression methods.
The most popular texture compression formats available: ETC1, ETC2, BC1, PVRTC and PVRTC2
Finally, visual quality is also a determining factor even for mobile devices. Because lossy compression can be tolerable in a rendering system such as a GPU, most texture compression algorithms involve some form of quantization for fixed-size blocks of pixels. But as high-resolution displays for portable devices start to become a common feature, getting the right balance between image quality and compression factors is a necessary step in writing an app optimized for the mobile world.
Why use texture compression?
The core OpenGL ES 2.0 specification does not define a particular compressed texture format but supports the loading of a wide range of compressed texture data. As more developers are writing apps that run across various operating systems (iOS, Android, BlackBerry 10, Windows 8), using a unified texture compression format will ensure the same consistent experience across more billions of devices. As all our PowerVR Series5/5XT and Series6 support all available texture compression standards for mobile, developers will enjoy the best of both worlds: considerable visual enhancements and a significant reduction in memory footprint compared to block-based compression techniques.
Even though block-based methods such as S3TC and ETC1 suffer from discontinuities along rectangular regions, there are alternative formats which resolve these issues and provide the best possible quality. For example, PVRTC doesn't consider the texture as independent blocks of texels, but it represents the texture as a pair of low-resolution images, which are bilinearly upscaled. These upscaled images are, in turn, blended on a pixel-by-pixel basis, by a full resolution, but low precision, modulation image.
To get a detailed look at how PVRTC works, including the data word structure and a short explanation of the texture compression algorithm, check out this blog article I've written a while ago.
PVRTC2 builds on the success of our previous texture compression standard, PVRTC, by bringing several vital improvements like NPOT and texture atlas support. Therefore, if your target platform has a Series5XT or Series6 GPU, you should use PVRTC2 as the results will be significantly better compared to PVRTC.
NPOT (Non Power of Two) textures were introduced with OpenGL ES 2.0 and eliminate the need for increasing pixel surfaces to match powers of two, especially for larger texture dimensions: for example a 1600×1200 texture would have required using a 2048×2048 pixel surface which wasted a lot of memory. For applications that use many small textures frequently, using sub-textures from a texture atlas can be often a more efficient way of using the graphics hardware’s resources. Tile-based games usually benefit greatly in performance from a texture atlas.
To get a detailed look at how PVRTC2 works, including the data word structure and a short explanation of the texture compression algorithm, check out this blog article I've written a while ago.
A comparison of texture compression types for mobile
There are currently six well-known compression types supported by OpenGL ES:
- PVRTC, Imagination’s widely used PowerVR texture compression
- PVRTC2, the recently updated PowerVR texture compression
- ETC1 (Ericsson texture compression) and ETC2/EAC (backwards compatible with ETC1 and mandatory in the OpenGL ES 3.0 graphics standard)
- ASTC (Adaptive scalable texture compression), a new optional extension for both OpenGL and OpenGL ES
- ATITC (ATI texture compression)
- S3TC (S3 texture compression), also called DXTn, DXTC or BCn
These are the results:
Being able to have textures compressed at all times improves cache use efficiency. The PowerVR architecture only decompresses texels when needed in the final rendering process, resulting in significant reductions in on-chip bandwidth and processing power. This is one of many reasons why texture compression formats have been, and continue to be, a key part of every generation of mobile graphics architectures.