Version: 2019.2
Android Player 设置
Gradle for Android

Android 2D Texture Overrides

本页面将详细介绍 Android 特有的__纹理覆盖 (Texture Overrides)__。可在此处找到常规纹理覆盖的说明。

The information contained on this page assumes the reader has working knowledge of DXT and ETC Texture compression, OpenGL ES, and Android development.

有关纹理压缩和 OpenGL ES 的更多信息,请访问以下 Wikipedia 页面:

Android 2D Texture Override settings in the Textures Inspector window. Click the Android logo to access Android-specific overrides.
Android 2D Texture Override settings in the Texture’s Inspector window. Click the Android logo to access Android-specific overrides.
Texture format Internal representation
RGB Compressed DXT1 压缩 RGB 纹理。受到 NVIDIA Tegra 的支持。4 位/像素(256x256 纹理为 32 KB)。
RGB Crunched DXT1 压缩 RGB 纹理。受到 NVIDIA Tegra 的支持。Crunch 是一种基于 DXT 纹理压缩的有损压缩格式。在运行时,纹理由 CPU 解压缩为 DXT1,然后上传到 GPU。与常规 DXT1 压缩相比,Crunch 产生较小的纹理,但质量较低。Crunch 纹理可能需要很长时间进行压缩,但在运行时的解压缩速度非常快。4 位/像素(输出大小取决于纹理;对于 256x256 纹理而言的起始大小为 1 KB)。
RGBA Compressed DXT5 压缩 RGBA 纹理。受到 NVIDIA Tegra 的支持。8 位/像素(256x256 纹理为 64 KB)。
RGBA Crunched DXT5 压缩 RGBA 纹理。受到 NVIDIA Tegra 的支持。Crunch 是一种基于 DXT 纹理压缩的有损压缩格式。在运行时,纹理在 CPU 上解压缩为 DXT5,然后上传到 GPU。与常规 DXT5 压缩相比,使用 Crunch 压缩可产生明显更小的纹理,但质量较低。Crunch 纹理可能需要很长时间进行压缩,但在运行时的解压缩速度非常快。8 位/像素(输出大小取决于纹理;对于 256x256 纹理而言的起始大小为 1 KB)。
RGB Compressed ETC 4 bits 压缩 RGB 纹理。这是 Unity 中 Android 项目的默认纹理格式。ETC_RGB4 是 OpenGL ES 2.0 的一部分,受到所有 OpenGL ES 2.0 GPU 的支持。它不支持 Alpha。4 位/像素(256x256 纹理为 32 KB)。
RGB Crunched ETC 压缩 RGB 纹理。Crunch 是一种基于 ETC 纹理压缩的有损压缩格式。在运行时,纹理由 CPU 解压缩为 ETC_RGB4,然后上传到 GPU。与常规 ETC_RGB4 压缩相比,Crunch 产生较小的纹理,但质量较低。Crunch 纹理可能需要很长时间进行压缩,但在运行时的解压缩速度非常快。ETC_RGB4 是 OpenGL ES 2.0 的一部分,受到所有 OpenGL ES 2.0 GPU 的支持。它不支持 Alpha。4 位/像素(输出大小取决于纹理;对于 256x256 纹理而言的起始大小为 1 KB)。
RGB Compressed ETC2 4 bits 压缩 RGB 纹理。ETC2 是 OpenGL ES 3.0 的一部分,受到所有 OpenGL ES 3.0 GPU 的支持。4 位/像素(256x256 纹理为 32 KB)。
RGB + 1-bit Alpha Compressed ETC2 4 bits 具有 1 位穿透 Alpha 的压缩 RGB 纹理。ETC2 是 OpenGL ES 3.0 的一部分,受到所有 OpenGL ES 3.0 GPU 的支持。4 位/像素(256x256 纹理为 32 KB)。
RGBA Compressed ETC2 8 bits 压缩 RGBA 纹理。受到所有 OpenGL ES 3.0 GPU 的支持。(256x256 纹理为 64 KB)
RGBA Crunched ETC2 压缩 RGBA 纹理。Crunch 是一种基于 ETC 纹理压缩的有损压缩格式。在运行时,纹理在 CPU 上解压缩为 ETC2_RGBA8,然后上传到 GPU。与常规 ETC2_RGBA8 压缩相比,使用 Crunch 压缩可产生明显更小的纹理,但质量较低。Crunch 纹理可能需要很长时间进行压缩,但在运行时的解压缩速度非常快。受到所有 OpenGL ES 3.0 GPU 的支持。8 位/像素(输出大小取决于纹理;对于 256x256 纹理而言的起始大小为 1 KB)。
RGB Compressed PVRTC 2 bits 压缩 RGB 纹理。受到 Imagination PowerVR GPU 的支持。2 位/像素(256x256 纹理为 16 KB)
RGBA Compressed PVRTC 2 bits 压缩 RGBA 纹理。受到 Imagination PowerVR GPU 的支持。2 位/像素(256x256 纹理为 16 KB)
RGB Compressed PVRTC 4 bits 压缩 RGB 纹理。受到 Imagination PowerVR GPU 的支持。4 位/像素(256x256 纹理为 32 KB)
RGBA Compressed PVRTC 4 bits 压缩 RGBA 纹理。受到 Imagination PowerVR GPU 的支持。4 位/像素(256x256 纹理为 32 KB)
RGB Compressed ATC 4 bits 压缩 RGB 纹理。受到 Qualcomm Snapdragon 的支持。4 位/像素(256x256 纹理为 32 KB)。
RGBA Compressed ATC 8 bits 压缩 RGBA 纹理。受到 Qualcomm Snapdragon 的支持。8 位/像素(256x256 纹理为 64 KB)。
RGB Compressed ASTC 4x4 block

RGB Compressed ASTC 5x5 block

RGB Compressed ASTC 6x6 block

RGB Compressed ASTC 8x8 block

RGB Compressed ASTC 10x10 block

RGB Compressed ASTC 12x12 block
压缩 RGB 纹理。受到所有 OpenGL ES 3.2 和 OpenGL ES 3.1 + AEP GPU 以及一部分 OpenGL ES 3.0 GPU 的支持。此压缩类型使用固定的 128 位块大小,并根据像素块大小(4x4 到 12x12)可达 8 到 0.89 位/像素。压缩纹理的大小从 256x256 纹理(4x4 块,最高质量)的 64 KB 到 256x256 纹理(12x12 块,最高压缩率)的 7.6 KB 不等。
RGBA Compressed ASTC 4x4 block

RGBA Compressed ASTC 5x5 block

RGBA Compressed ASTC 6x6 block

RGBA Compressed ASTC 8x8 block

RGBA Compressed ASTC 10x10 block

RGBA Compressed ASTC 12x12 block
压缩 RGBA 纹理。受到所有 OpenGL ES 3.2 和 OpenGL ES 3.1 + AEP GPU 以及一部分 OpenGL ES 3.0 GPU 的支持。此压缩类型使用固定的 128 位块大小,并根据像素块大小(4x4 到 12x12)可达 8 到 0.89 位/像素。压缩纹理的大小从 256x256 纹理(4x4 块,最高质量)的 64 KB 到 256x256 纹理(12x12 块,最高压缩率)的 7.6 KB 不等。
RGB 16 bit 65,000 种颜色,没有 Alpha。使用比压缩格式更多的内存,但可能更适合没有渐变的 UI 或清晰纹理。256x256 纹理为 128 KB。
RGB 24 bit 真实色彩,但没有 Alpha。256x256 纹理为 192 KB。
Alpha 8 bit 高质量 Alpha 通道,但没有任何颜色。256x256 纹理为 64 KB。
RGBA 16 bit 低质量真实色彩。具有 Alpha 通道的纹理的默认压缩格式。256x256 纹理为 128 KB。
RGBA 32 bit 真实色彩,并有 Alpha - 这是具有 Alpha 的纹理的最高质量压缩格式。256x256 纹理为 256 KB。
Compression quality 选择 Fast 可获得最快的性能,选择 Best 可获得最佳图像质量,选择 Normal 可获得这两者之间的平衡。

If your app is installed on a device that doesn’t support the Texture compression format it uses, Unity decompresses the Textures to RGBA 32 and store them in the device’s memory, along with the compressed Textures, while the app is running. This leads to increased loading times and higher memory usage, because Unity must decompress the Textures and store two versions of the Textures used (compressed and uncompressed). This can also have a large impact on rendering performance, especially on older, slower devices.

Use ETC2 compression unless your app targets specific hardware like the Nvidia Tegra. ETC2 supports Textures with and without an alpha channel, and all OpenGL ES 3 devices support it. To avoid software decompression, follow these steps:

  1. Open the Android Player settings (menu: Edit > Project Settings > Player Settings).
  2. In the Other Settings section, remove OpenGL ES 2 from the Graphics APIs list. This sets the minimum graphics API to OpenGL ES 3.
  3. In the Other Settings section, set the Minimum API Level to Android 4.4 ‘KitKat’ (API level 19).

To target OpenGL ES 2 and OpenGL ES 3 devices, you can create and publish two different APKs. Follow these steps:

  1. Build an APK that targets OpenGL ES 3, using the Player settings in the screenshot above.
  2. Build a separate APK that targets OpenGL ES 2. To do this, remove OpenGL ES 3 and Vulkan from the Graphics APIs section of the Player settings.
  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.

有关发布多个 APK 文件的更多信息,请参阅 Android 开发者文档中的以下主题:

在构建面向 OpenGL ES 2 的 APK 时,可使用 ETC1 纹理压缩。

The Texture compression format for OpenGL ES2-targeted APKs can be ETC1. Unity can use ETC1 for Textures with Alpha, provided they are placed on a sprite atlas (by specifying the packing tag) and the build is for Android. You can opt in for this by setting the Compress using ETC1 checkbox for the Texture. Unity then splits the resulting atlas into two Textures, each without alpha, and then combines them in the final parts of the render pipeline.

If you must store an alpha channel in a Texture, all hardware vendors support the RGBA 16 bit compression format.


  • 2017–09–18 页面已修订

  • Unity 2017.1 中的更新功能

  • 在 Unity 2017.3 中更新了 Crunch 压缩格式

Android Player 设置
Gradle for Android