Version: 2019.3
Texture types
Render Texture

Texture compression formats for platform-specific overrides

Unity supports many common image formats as source files for importing your TexturesAn image used when rendering a GameObject, Sprite, or UI element. Textures are often applied to the surface of a mesh to give it visual detail. More info
See in Glossary
(such as JPG, PNG, PSD, and TGA). However, 3D graphics hardware, such as graphics cards or mobile devices, doesn’t use these formats during real-time renderingThe process of drawing graphics to the screen (or to a render texture). By default, the main camera in Unity renders its view to the screen. More info
See in Glossary
. This hardware requires Textures to be compressed in specialized formats which are optimized for fast Texture sampling. Different platforms and devices each have their own proprietary formats.

By default, the Unity Editor automatically converts Textures to the most appropriate format to match the build target you have selected, and only includes converted Textures in the build. Your source Asset files remain in their original format in your Project’s Assets folder. However, most platforms support several Texture compression formats you can choose from.

Unity has default formats for each platform, but you can override them and choose different compression formats for some of your Textures (for example, if you are using a Texture as a mask, with only one channel, you might choose to use the BC4 format to reduce file size but preserve quality).

This page contains the following information:


For general information about importing Textures and how to set up overrides, see Texture Import Settings.

Texture compression concepts

This page uses the following concepts:

  1. RGB is a color model in which red, green and blue are added together in various ways to reproduce a broad array of colors.
  2. RGBA is a version of RGB with an alpha channel, which supports blending and opacity alteration.
  3. Bits per pixelThe smallest unit in a computer image. Pixel size depends on your screen resolution. Pixel lighting is calculated at every screen pixel. More info
    See in Glossary
    (bpp)
    is the amount of storage required for a single pixel. The lower this value, the more pixels can be stored in the cache on the GPU, which results in faster texture access.
  4. Variable bit rate (VBR) means that bits per pixel is not a fixed value, and depends on the actual content instead. VBR only applies to Crunch compression, and only texture size on disk. The size in memory is the same as when using the underlying texture format (for example, RGB Compressed DXT1 for RGB Crunched DXT1).
  5. Crunch compression is a lossy compression format (part of the data is lost during compression) on top of DXT or ETC Texture compression. Textures are decompressed to DXT or ETC on the CPU, and then uploaded to the GPU at runtime. Crunch compression helps the Texture use the lowest possible amount of disk space, but has no effect on runtime memory usage. Crunch Textures can take a long time to compress, but decompression at runtime is very fast.

Default formats for supported platforms

The following table shows the default formats used for each platform.

Platform Color model None Normal quality (default) High quality Low quality (higher performance)
Windows, Linux, macOS, PS4, XBox OneMicrosoft’s eighth generation video game console.
See in Glossary
RGB RGB 24 bit RGB Compressed DXT1 RGB(A) Compressed BC7 RGB Compressed DXT1
RGBA RGBA 32 bit RGBA Compressed DXT5 RGB(A) Compressed BC7 RGBA Compressed DXT5
HDRhigh dymanic range
See in Glossary
RGBA Half RGB Compressed BC6H RGB Compressed BC6H RGB Compressed BC6H
WebGLA JavaScript API that renders 2D and 3D graphics in a web browser. The Unity WebGL build option allows Unity to publish content as JavaScript programs which use HTML5 technologies and the WebGL rendering API to run Unity content in a web browser. More info
See in Glossary
RGB RGB 24 bit RGB Compressed DXT1 RGB Compressed DXT1 RGB Compressed DXT1
RGBA RGBA 32 bit RGBA Compressed DXT5 RGBA Compressed DXT5 RGBA Compressed DXT5
Android (only when Don’t override is enabled in the build settings) RGB RGB 24 bit RGB Compressed ETC RGB Compressed ETC RGB Compressed ETC
RGBA RGBA 32 bit RGBA Compressed ETC2 RGBA Compressed ETC2 RGBA Compressed ETC2
iOSApple’s mobile operating system. More info
See in Glossary
RGB RGB 24 bit RGB Compressed PVRTC 4 bits RGB Compressed PVRTC 4 bits RGB Compressed PVRTC 2 bits
RGBA RGBA 32 bit RGBA Compressed PVRTC 4 bits RGBA Compressed PVRTC 4 bits RGBA Compressed PVRTC 2 bits
tvOS RGB RGB 24 bit RGB Compressed ASTC 6x6 block RGB Compressed ASTC 4x4 block RGB Compressed ASTC 8x8 block
RGBA RGBA 32 bit RGBA Compressed ASTC 6x6 block RGBA Compressed ASTC 4x4 block RGBA Compressed ASTC 8x8 block
Default RGBA RGBA 32 bit RGBA 16 bit RGBA 16 bit RGBA 16 bit

All supported Texture compression formats

The following tables show the Texture compression format options available on each platform, and the resulting compressed file size on disk (based on a 256 by 256 pixel image).

Choosing a Texture compression format is a balance between file size, quality and compression time: the higher the quality, the greater the file size. For the best performance, especially on mobile devices, use the format with the fewest bits per pixel that is supported by the hardware your application targets, as long as that format provides sufficient visual quality.

Different platforms have different hardware, and are optimised to work most efficiently with specific compression formats. When you use a Texture compression format that the target platform supports, the GPU can use it directly and the platform doesn’t spend any resources to decompress the Texture to a supported format. This can improve your application’s performance.

If you use a Texture compression format that the target platform doesn’t support, Textures are decompressed to RGBA 32 bit (unless noted otherwise) and stored in memory alongside the compressed Textures. This increases texture loading time and uses additional memory, which means that choosing non-compatible formats can impact your application’s performance.

The tables below show supported platforms for each compression format.

Note: Size in memory is based on a 256 x 256 pixel Texture.

Texture compression format Description Size in memory Windows Linux Mac PS4 Xbox One Android iOS tvOS WebGL
RGB Compressed DXT1 Compressed unsigned normalised integer RGB Texture. 32KB / 4 bpp yes yes yes yes yes partial (1) no no partial (2)
RGB Crunched DXT1 RGB Compressed DXT1, with additional Crunch compression. VBR yes yes yes yes yes partial (1) no no partial (2)
RGBA Compressed DXT5 Compressed unsigned normalised integer RGBA Texture. 64KB / 8 bpp yes yes yes yes yes partial (1) no no partial (2)
RGBA Crunched DXT5 RGBA Compressed DXT5, with additional Crunch compression. VBR yes yes yes yes yes partial (1) no no partial (2)
RGB Compressed BC6H Compressed unsigned float/High Dynamic Range (HDR) RGB Texture. 64KB / 8 bpp partial (3) yes partial (3) yes yes no no no no
RGB(A) Compressed BC7 High-quality compressed unsigned normalised integer RGB or RGBA Texture. 64KB / 8 bpp partial (3) yes partial (3) yes yes no no no no
RGB 16 bit Uncompressed format with 65536 colors without alpha. Uses more memory than the compressed formats, but could be more suitable for UI(User Interface) Allows a user to interact with your application. More info
See in Glossary
or crisp Textures without gradients.
128KB / 16 bpp yes yes yes yes yes yes yes yes yes
RGB 24 bit True color, without alpha. 192KB / 24 bpp yes yes yes yes yes yes yes yes yes
RGB9e5 32 Bit Shared Exponent Float Floating-point / High Dynamic Range (HDR) texture without alpha channel. 256 KB / 32 bpp yes yes yes yes yes partial (4) partial (4) partial (4) partial (4)
Alpha 8 High-quality uncompressed alpha channel. 64KB / 8 bpp yes yes yes yes yes yes yes yes yes
R 8 High-quality uncompressed single-channel texture. 64KB / 8 bpp yes yes yes yes yes partial (5) partial (5) partial (5) partial (5)
R 16 bit Ultra-high-quality uncompressed single-channel texture. 128KB / 16 bpp yes yes yes yes yes partial (6) partial (6) partial (6) no
RGBA 16 bit Low-quality true color. 128KB / 16 bpp yes yes yes yes yes yes yes yes yes
RGBA 32 bit True color with alpha. 256KB / 32 bpp yes yes yes yes yes yes yes yes yes
RGBA Half Half-precision floating point / High Dynamic Range (HDR) RGBA format. 512KB / 64bpp yes yes yes yes yes partial (7) partial (7) partial (7) partial (7)

Notes:

  1. On Nvidia Tegra GPUs only.
  2. With linear rendering on web browsers that do not support sRGB DXT, textures are decompressed at runtime to RGBA32.
  3. Windows Direct3D 11, Windows OpenGL 4, macOS Metal. On platforms with Direct3D 10 ShaderA small script that contains the mathematical calculations and algorithms for calculating the Color of each pixel rendered, based on the lighting input and the Material configuration. More info
    See in Glossary
    Model 4 and OpenGL 3 GPUs (Windows) and on macOS OpenGL, BC6H textures are decompressed to RGBA Half, and BC7 textures are decompressed to RGBA32.
  4. Requires Metal on iOS and tvOS; Vulkan or OpenGL ES 3.0 or Nvidia Tegra on Android; WebGL 2.
  5. Requires Metal on iOS and tvOS; Vulkan or OpenGL ES 3.0 or GL_EXT_texture_rg extension on Android; WebGL 2.
  6. Requires Metal on iOS and tvOS; Vulkan or OpenGL ES 3.0 and GL_EXT_texture_norm16 extension on Android.
  7. Requires Metal on iOS and tvOS; Vulkan or OpenGL ES 3.0 or GL_OES_texture_half_float extension on Android; WebGL 2 or OES_texture_half_float extension on WebGL.

You can import Textures from DDS files, but only DXT, BC compressed formats, or uncompressed pixel formats are supported.

Mobile and WebGL specific formats

The formats in the table below are only supported on Android, iOS, tvOS, and WebGL.

Note: Size is based on a 256 x 256 pixel Texture.

Texture compression format Description Size Android iOS tvOS WebGL
RGB Compressed ETC Compressed RGB Texture. This format is supported by all OpenGL ES 2.0 GPUs. 32KB / 4 bpp yes yes yes partial (1)
RGB Crunched ETC RGB Compressed ETC, with additional Crunch compression. VBR yes yes yes partial (1)
RGB Compressed ETC2 Compressed RGB Texture. 32KB / 4 bpp partial (2) partial (3) partial (3) partial (1)
RGBA Compressed ETC2 Compressed RGBA Texture. This format is supported by all OpenGL ES 3.0 GPUs. 64KB / 8 bpp partial (2) partial (3) partial (3) partial (1)
RGBA Crunched ETC2 RGBA Compressed ETC2, with additional Crunch compression. VBR partial (2) partial (3) partial (3) partial (1)
RGB + 1-bit Alpha Compressed ETC2 4 bits Compressed RGBA texture with alpha channel limited to either fully opaque or fully transparent. 32KB / 4 bpp partial (2) partial (3) partial (3) partial (1)
RG Compressed EAC 8 bit High-quality compressed RG (two-channel) texture. 64KB / 8 bpp partial (2) partial (3) partial (3) partial (1)
R Compressed EAC 4 bit High-quality compressed R (single-channel) texture. 32KB / 4 bpp partial (2) partial (3) partial (3) partial (1)
RGB(A) Compressed ASTC Variable block size compressed RGB or RGBA Texture. This format is supported by all OpenGL ES 3.1 and Vulkan GPUs. 12x12: 7744 bytes / 0.89 bpp

10x10: 10816bytes / 1.28 bpp

8x8: 16KB / 2 bpp

6x6: 29584 bytes / 3.56 bpp

5x5: 43264 bytes / 5.12 bpp

4x4: 64KB / 8 bpp
partial (4) partial (5) yes partial (6)
RGB(A) Compressed ASTC HDR Variable block size compressed unsigned float/High Dynamic Range (HDR) RGB or RGBA Texture. 12x12: 7744 bytes / 0.89 bpp

10x10: 10816bytes / 1.28 bpp

8x8: 16KB / 2 bpp

6x6: 29584 bytes / 3.56 bpp

5x5: 43264 bytes / 5.12 bpp

4x4: 64KB / 8 bpp
partial (7) no no no
RGB Compressed PVRTC 2 bits (8) High-compression RGB Texture. 16KB / 2 bpp partial (9) yes yes no
RGBA Compressed PVRTC 2 bits High-compression RGBA Texture. 16KB / 2 bpp partial (9) yes yes no
RGB Compressed PVRTC 4 bits Compressed RGB Texture. 32KB / 4 bpp partial (9) yes yes no
RGBA Compressed PVRTC 4 bits Compressed RGBA Texture. 32KB / 4 bpp partial (9) yes yes no

Notes:

  1. ETC1 and ETC2/EAC are supported on WebGL only on a subset of browsers.
  2. ETC2 is not supported on Android when running OpenGL ES 2. In this case, the texture is decompressed at runtime to the format specified by ETC2 fallback in the Android Build Settings or on the Android tab for the Platform-specific overrides.
  3. ETC2 is not supported on iOS and tvOS when running OpenGL ES 2.
  4. Requires GL_KHR_texture_compression_astc_ldr extension or Vulkan support.
  5. Requires A8 GPU or newer.
  6. Requires WEBGL_compressed_texture_astc extension.
  7. Requires GL_KHR_texture_compression_astc_hdr extension. When this extension is not supported, the texture is decompressed at run time to RGB9E5 format, losing the alpha channel.
  8. All PVRTC formats require square textures with power-of-two dimensions.
  9. On PowerVR GPUs only.

Notes on iOS

Default texture compression settings (PVRTC) are chosen for broader compatibility. If your application does not include OpenGL ES 2 support, you can choose one of the ASTC formats. They offer better quality and flexibility, and compression is faster than PVRTC.

Notes on tvOS

Unity supports only tvOS devices that have Metal support. ASTC is the default texture compression on this platform. If you manually add OpenGL ES 2, make sure to change the texture compression to either PVRTC or ETC to avoid texture decompression at runtime.

Notes on Android

Regular Textures

Unless your app targets specific hardware (such as Nvidia Tegra or Imagination PowerVR), you have to choose between several compressed and uncompressed formats, which offer different trade-offs:

Format Description Support
ASTC The most flexible format, as it allows you to fine-tune file size and resulting quality using different block sizes. Supported on all devices running Vulkan or OpenGL ES 3.1, and on some devices running OpenGL ES 3.0.
ETC2/EAC Standard texture compression format for OpenGL ES 3.0. The resulting image quality is quite high, and it supports one- to four-component texture data. It’s not supported by OpenGL ES 2 devices, so the texture is decompressed at run time to the format specified by ETC2 fallback. Supported on OpenGL ES 3.0.
Not supported on OpenGL ES 2.
ETC Block-based Texture compression format. The image is split up into 4×4 blocks, and each block is encoded using a fixed number of bits. The drawback is that there is no direct alpha channel support, so it’s not suitable for textures that have transparency information. Unity provides an automated way of handling texture with alpha channels placed in a texture atlas (you can specify this using a packing tag on sprites).

To enable this, enable the Android-specific Split Alpha Channel option for the Texture when importing a Sprite AtlasA texture that is composed of several smaller textures. Also referred to as a texture atlas, image sprite, sprite sheet or packed texture. More info
See in Glossary
. Unity splits the resulting atlas into two Textures, one with RGB data and one with alpha channel data duplicated in all three (RGB) channels, and then combines them in the final parts of the render pipeline.
Supported on all Android devices.
RGBA 16 bit Uncompressed format that has an alpha channel. It takes twice as much memory as ETC2. This is a reasonably good format to choose for pixel-perfect UI without strong gradients. Supported on all devices.
RGBA 32 bit Uncompressed format that offers highest quality and has alpha channel support. It takes four times as much memory compared to ETC2. This is a format of choice for the best-looking, pixel-perfect UI. Supported on all devices.

HDR Textures

For high dynamic range (HDR) textures, choose from one of the following formats:

  • ASTC HDR is the only compressed format available on Android devices for HDR textures. It requires Vulkan or GL_KHR_texture_compression_astc_hdr support. As with low dynamic range textures, this is the most flexible format.
  • RGB9e5 is a packed format without an alpha channel. All devices running Vulkan or OpenGL ES 3.0, and devices with Nvidia Tegra GPUs, support this format.
  • RGBA Half is an uncompressed floating-point format with half precision. It takes twice as much memory as RGB9e5, but has an alpha channel and is supported by most devices.

Targeting multiple devices with separate APKs

You can publish multiple Android packages (APKs) that target different hardware. For example, to publish two separate APKsThe Android Package format output by Unity. An APK is automatically deployed to your device when you select File > Build & Run. More info
See in Glossary
(one that targets devices that support OpenGL ES 3.0 and newer, and another for OpenGL ES 2.0-only devices), follow these steps:

1. Build an APK that targets OpenGL ES 3.

  1. Access the Android Player SettingsSettings that let you set various player-specific options for the final game built by Unity. More info
    See in Glossary
    (menu: Edit > Project Settings > Player Settings, then select the Android category).
  2. Scroll down to the Graphics APIs section.
  3. Make sure OpenGL ES 2 is not in the list.
  4. Build the APK (menu: File > Build Settings, then click Build).

2. Build a separate APK that targets OpenGL ES 2

  1. Access the Android Player Settings.
  2. Scroll down to the Graphics APIs section.
  3. Add OpenGL ES 2 and remove OpenGL ES 3 and Vulkan from the list.
  4. Build the APK.

3. Publish both of these APKs to the Google Play Store.

When a user downloads your app, the Google Play Store automatically installs the most relevant APK for their device.

For more information about publishing multiple APK files, see Android Developer documentation on:



  • Linear rendering on WebGL added in 2017.2 NewIn20172

  • Crunch compression format updated in 2017.3 NewIn20173

  • Tizen and Samsung TV support discontinued in 2017.3 NewIn20173

  • ASTC HDR texture compression for Android added in 2019.1 NewIn20191

  • Content refreshed for Unity 2019.3 NewIn20193

Texture types
Render Texture
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961