（最常用的贴图压缩格式是：ETC1, ETC2, BC1, PVRTC和PVRTC2）
核心OpenGL ES 2.0规格没有指定的压缩贴图格式，且支持加载多种压缩贴图数据。因为越来越应用支持在多个操作系统中（游戏邦注：包括iOS、Android、BlackBerry 10、Windows 8）中运行，所以必须使用统一的贴图压缩格式，以保证10亿部以上的设备上的体验操持一致。因为所有的PowerVR Series5/5XT和Series6都支持以上贴图压缩标准，所以开发者可以得到双重好处：相比于基于块的压缩技术，视觉效果大大提升，同时内存痕迹大大减少。
NPOT（非2次方）贴图是与Series5XT or Series6 GPU一起引入的，它取消了象素表面必须匹配2次方的要求，特别是对于大型贴图：如1600×1200贴图本需要2048×2048象素表面，这会浪费大量内存。对于经常使用许多小贴图的应用，使用来自贴图集的子贴图可以更有效地使用图形硬件的资源。基于贴图的游戏非常适合使用贴图集。
- ETC1（Ericsson贴图压缩）和ETC2/EAC（用ETC1反向兼容，强制OpenGL ES 3.0图像标准）
- ASTC （自适应伸展贴图压缩）, OpenGL和OpenGL ES新的可选择扩展
- ATITC （ATI贴图压缩）
Why efficiency is key in texture compression standards for mobile graphics
by Alexandru Voica
Imagination’s PVRTC and PVRTC2 texture compression technology provides significant enhancements in quality and efficiency offering application developers unrivaled performance 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 PVRTC texture 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.
PVRTC2 and PVRTC compared against ETC1, ETC2 and BC1
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 PVRTC and PVRTC2?
PVRTC and PVRTC2 are Imagination’s proprietary texture compression standard for our PowerVR graphics cores.
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 PVRTC will ensure the same consistent experience across more than 1 billion devices. As all our PowerVR Series5/5XT and Series6 support the PVRTC texture compression standard, developers will enjoy the best of both worlds: considerable visual enhancements and a significant reduction in memory footprint compared to block-based compression techniques. In addition to this, they will benefit from the many other advantages of the PowerVR GPU architecture such as high hardware efficiency, a low power design, and unrivalled performance with reduced area costs.
The main aim of PVRTC is to avoid the discontinuities along rectangular regions that frequently occur with block-based methods such as S3TC and ETC1. Rather than consider the texture as independent blocks of texels, 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.
Its other main advantage is the support of RGBA in both 4bpp and 2bpp modes. If you want to get really specific about the mathematical wizardry behind this, there’s a whitepaper on the subject written by Simon Fenney which you can access on our website.
Using PVRTC not only gets you very high compression factors of 8:1 for 4bpp or (amazingly) 16:1 for 2bpp and a superior image quality, but also ensures that your application is optimized for the hardware platforms on which it runs as there is a direct correlation between the choice of the PVRTC scheme and an enhanced user experience.
As mentioned, PVRTC also supports both opaque (RGB) and translucent (RGBA) textures. Alpha data is stored only for areas that it is actually needed, so if local area is opaque, all the available data will be used to store RGB data. Although the PVRTC 2bpp format offers the highest memory and bandwidth savings, it’s important to consider textures on a case by case basis so developers should try both 4bpp and 2bpp to decide which works best for them. We’ve made sure that by choosing either PVRTC 2bpp or PVRTC 4bpp, you will still have significantly higher quality with no compromises in memory bandwidth, power consumption or performance.
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. 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.
Alongside RGB and RGBA support with 4bpp and 2bpp encoding, PVRTC2 offers better image quality, especially for textures with large areas of colour discontinuity. Developers will not have to worry about texture manipulation techniques such as border expansion to eliminate previous issues in normal mapping or for collection of sub-images (texture atlases).
Non-tiling textures will also look much better thanks to the addition of dedicated modes for dealing with areas of high contrast between texture sections. This also simplifies working with images in a skybox as borders around them are no longer needed.
To increase the efficient use of memory, PVRTC2 also introduces support for NPOT (Non Power of Two) textures that were introduced with OpenGL ES 2.0. These textures 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. PVRTC2 can natively support any size the developer chooses to use.
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. PVRTC2 supports sub-texturing at data-word boundaries (4×4 or 8×4 for PVRTC2 4bpp or PVRTC2 2bpp respectively).
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
This case study will focus on PVRTC and PVRTC2, comparing them to other compression standards supported by existing silicon to test their visual efficiency.
For PVRTC and PVRTC2, the PVRTexTool from the PowerVR Graphics SDK v3.0 has been used to compress the images mentioned above. Our tool includes an intuitive GUI, support for other popular texture compressions formats and implements error metrics which allow you to compare between results.
These are the results:
More comparissons and results for PVRTC and PVRTC2 can be found on Imagination’s PowerVR developer blogs.
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 PowerVR PVRTC and PVRTC2 have been, and continue to be, a key part of every generation of PowerVR graphics architecture, including the forthcoming Series6.(source:gamasutra)