# TextureFormat

> Format used when creating textures from scripts.

## Definition

* **Type:** Enum
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public enum TextureFormat
```

## Remarks

```csharp
using UnityEngine;

public class Example : MonoBehaviour
{
    void Start()
    {
        // Create a new alpha-only texture and assign it
        // to the renderer's material
        Texture2D texture = new Texture2D(128, 128, TextureFormat.Alpha8, false);
        GetComponent<Renderer>().material.mainTexture = texture;
    }
}
```

Note that not all graphics cards support all texture formats, use [SystemInfo.SupportsTextureFormat](/engine/6000.7/script-reference/unityengine/systeminfo/supportstextureformat.md) to check. Also, only the [Texture2D](/engine/6000.7/script-reference/unityengine/texture2d.md) class supports texture creation from script with Crunch compression texture formats.

Additional Resources: [Texture2D](/engine/6000.7/script-reference/unityengine/texture2d.md), [texture assets](/engine/6000.7/manual/materials-and-shaders/textures/textures-getting-started/textures.md).

## Fields

| Value                                                                                                  | Description                                                                                            |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| [Alpha8](/engine/6000.7/script-reference/unityengine/textureformat/alpha8.md)                          | Alpha-only texture format, 8 bit integer.                                                              |
| [ARGB32](/engine/6000.7/script-reference/unityengine/textureformat/argb32.md)                          | Color with alpha texture format, 8-bits per channel.                                                   |
| [ARGB4444](/engine/6000.7/script-reference/unityengine/textureformat/argb4444.md)                      | A 16 bits/pixel texture format. Texture stores color with an alpha channel.                            |
| [ASTC\_10x10](/engine/6000.7/script-reference/unityengine/textureformat/astc-10x10.md)                 | ASTC (10x10 pixel block in 128 bits) compressed RGB(A) texture format.                                 |
| [ASTC\_12x12](/engine/6000.7/script-reference/unityengine/textureformat/astc-12x12.md)                 | ASTC (12x12 pixel block in 128 bits) compressed RGB(A) texture format.                                 |
| [ASTC\_4x4](/engine/6000.7/script-reference/unityengine/textureformat/astc-4x4.md)                     | ASTC (4x4 pixel block in 128 bits) compressed RGB(A) texture format.                                   |
| [ASTC\_5x5](/engine/6000.7/script-reference/unityengine/textureformat/astc-5x5.md)                     | ASTC (5x5 pixel block in 128 bits) compressed RGB(A) texture format.                                   |
| [ASTC\_6x6](/engine/6000.7/script-reference/unityengine/textureformat/astc-6x6.md)                     | ASTC (6x6 pixel block in 128 bits) compressed RGB(A) texture format.                                   |
| [ASTC\_8x8](/engine/6000.7/script-reference/unityengine/textureformat/astc-8x8.md)                     | ASTC (8x8 pixel block in 128 bits) compressed RGB(A) texture format.                                   |
| [ASTC\_HDR\_10x10](/engine/6000.7/script-reference/unityengine/textureformat/astc-hdr-10x10.md)        | ASTC (10x10 pixel block in 128 bits) compressed RGB(A) HDR texture format.                             |
| [ASTC\_HDR\_12x12](/engine/6000.7/script-reference/unityengine/textureformat/astc-hdr-12x12.md)        | ASTC (12x12 pixel block in 128 bits) compressed RGB(A) HDR texture format.                             |
| [ASTC\_HDR\_4x4](/engine/6000.7/script-reference/unityengine/textureformat/astc-hdr-4x4.md)            | ASTC (4x4 pixel block in 128 bits) compressed RGB(A) HDR texture format.                               |
| [ASTC\_HDR\_5x5](/engine/6000.7/script-reference/unityengine/textureformat/astc-hdr-5x5.md)            | ASTC (5x5 pixel block in 128 bits) compressed RGB(A) HDR texture format.                               |
| [ASTC\_HDR\_6x6](/engine/6000.7/script-reference/unityengine/textureformat/astc-hdr-6x6.md)            | ASTC (6x6 pixel block in 128 bits) compressed RGB(A) HDR texture format.                               |
| [ASTC\_HDR\_8x8](/engine/6000.7/script-reference/unityengine/textureformat/astc-hdr-8x8.md)            | ASTC (8x8 pixel block in 128 bits) compressed RGB(A) texture format.                                   |
| [BC4](/engine/6000.7/script-reference/unityengine/textureformat/bc4.md)                                | Compressed one channel (R) texture format.                                                             |
| [BC5](/engine/6000.7/script-reference/unityengine/textureformat/bc5.md)                                | Compressed two-channel (RG) texture format.                                                            |
| [BC6H](/engine/6000.7/script-reference/unityengine/textureformat/bc6h.md)                              | HDR compressed color texture format.                                                                   |
| [BC7](/engine/6000.7/script-reference/unityengine/textureformat/bc7.md)                                | High quality compressed color texture format.                                                          |
| [BGRA32](/engine/6000.7/script-reference/unityengine/textureformat/bgra32.md)                          | Color with alpha texture format, 8-bits per channel.                                                   |
| [DXT1](/engine/6000.7/script-reference/unityengine/textureformat/dxt1.md)                              | Compressed color texture format.                                                                       |
| [DXT1Crunched](/engine/6000.7/script-reference/unityengine/textureformat/dxt1crunched.md)              | Compressed color texture format with Crunch compression for smaller storage sizes.                     |
| [DXT5](/engine/6000.7/script-reference/unityengine/textureformat/dxt5.md)                              | Compressed color with alpha channel texture format.                                                    |
| [DXT5Crunched](/engine/6000.7/script-reference/unityengine/textureformat/dxt5crunched.md)              | Compressed color with alpha channel texture format with Crunch compression for smaller storage sizes.  |
| [EAC\_R](/engine/6000.7/script-reference/unityengine/textureformat/eac-r.md)                           | ETC2 / EAC (GL ES 3.0) 4 bits/pixel compressed unsigned single-channel texture format.                 |
| [EAC\_R\_SIGNED](/engine/6000.7/script-reference/unityengine/textureformat/eac-r-signed.md)            | ETC2 / EAC (GL ES 3.0) 4 bits/pixel compressed signed single-channel texture format.                   |
| [EAC\_RG](/engine/6000.7/script-reference/unityengine/textureformat/eac-rg.md)                         | ETC2 / EAC (GL ES 3.0) 8 bits/pixel compressed unsigned dual-channel (RG) texture format.              |
| [EAC\_RG\_SIGNED](/engine/6000.7/script-reference/unityengine/textureformat/eac-rg-signed.md)          | ETC2 / EAC (GL ES 3.0) 8 bits/pixel compressed signed dual-channel (RG) texture format.                |
| [ETC2\_RGB](/engine/6000.7/script-reference/unityengine/textureformat/etc2-rgb.md)                     | ETC2 (GL ES 3.0) 4 bits/pixel compressed RGB texture format.                                           |
| [ETC2\_RGBA1](/engine/6000.7/script-reference/unityengine/textureformat/etc2-rgba1.md)                 | ETC2 (GL ES 3.0) 4 bits/pixel RGB+1-bit alpha texture format.                                          |
| [ETC2\_RGBA8](/engine/6000.7/script-reference/unityengine/textureformat/etc2-rgba8.md)                 | ETC2 (GL ES 3.0) 8 bits/pixel compressed RGBA texture format.                                          |
| [ETC2\_RGBA8Crunched](/engine/6000.7/script-reference/unityengine/textureformat/etc2-rgba8crunched.md) | Compressed color with alpha channel texture format using Crunch compression for smaller storage sizes. |
| [ETC\_RGB4](/engine/6000.7/script-reference/unityengine/textureformat/etc-rgb4.md)                     | ETC (GLES2.0) 4 bits/pixel compressed RGB texture format.                                              |
| [ETC\_RGB4Crunched](/engine/6000.7/script-reference/unityengine/textureformat/etc-rgb4crunched.md)     | Compressed color texture format with Crunch compression for smaller storage sizes.                     |
| [R16](/engine/6000.7/script-reference/unityengine/textureformat/r16.md)                                | Single channel (R) texture format, 16-bits unsigned integer.                                           |
| [R16\_SIGNED](/engine/6000.7/script-reference/unityengine/textureformat/r16-signed.md)                 | Single channel (R) texture format, 16-bits signed integer.                                             |
| [R8](/engine/6000.7/script-reference/unityengine/textureformat/r8.md)                                  | Single channel (R) texture format, 8-bits unsigned integer.                                            |
| [R8\_SIGNED](/engine/6000.7/script-reference/unityengine/textureformat/r8-signed.md)                   | Single channel (R) texture format, 8-bits signed integer.                                              |
| [RFloat](/engine/6000.7/script-reference/unityengine/textureformat/rfloat.md)                          | Scalar (R) texture format, 32 bit floating point.                                                      |
| [RG16](/engine/6000.7/script-reference/unityengine/textureformat/rg16.md)                              | Two channel (RG) texture format, 8-bits unsigned integer per channel.                                  |
| [RG16\_SIGNED](/engine/6000.7/script-reference/unityengine/textureformat/rg16-signed.md)               | Two channel (RG) texture format, 8-bits signed integer per channel.                                    |
| [RG32](/engine/6000.7/script-reference/unityengine/textureformat/rg32.md)                              | Two channel (RG) texture format, 16-bits unsigned integer per channel.                                 |
| [RG32\_SIGNED](/engine/6000.7/script-reference/unityengine/textureformat/rg32-signed.md)               | Two channel (RG) texture format, 16-bits signed integer per channel.                                   |
| [RGB24](/engine/6000.7/script-reference/unityengine/textureformat/rgb24.md)                            | Three channel (RGB) texture format, 8-bits unsigned integer per channel.                               |
| [RGB24\_SIGNED](/engine/6000.7/script-reference/unityengine/textureformat/rgb24-signed.md)             | Three channel (RGB) texture format, 8-bits signed integer per channel.                                 |
| [RGB48](/engine/6000.7/script-reference/unityengine/textureformat/rgb48.md)                            | Three channel (RGB) texture format, 16-bits unsigned integer per channel.                              |
| [RGB48\_SIGNED](/engine/6000.7/script-reference/unityengine/textureformat/rgb48-signed.md)             | Three color (RGB) texture format, 16-bits signed integer per channel.                                  |
| [RGB565](/engine/6000.7/script-reference/unityengine/textureformat/rgb565.md)                          | A 16 bit color texture format.                                                                         |
| [RGB9e5Float](/engine/6000.7/script-reference/unityengine/textureformat/rgb9e5float.md)                | RGB HDR format, with 9 bit mantissa per channel and a 5 bit shared exponent.                           |
| [RGBA32](/engine/6000.7/script-reference/unityengine/textureformat/rgba32.md)                          | Four channel (RGBA) texture format, 8-bits unsigned integer per channel.                               |
| [RGBA32\_SIGNED](/engine/6000.7/script-reference/unityengine/textureformat/rgba32-signed.md)           | Four channel (RGBA) texture format, 8-bits signed integer per channel.                                 |
| [RGBA4444](/engine/6000.7/script-reference/unityengine/textureformat/rgba4444.md)                      | Color and alpha  texture format, 4 bit per channel.                                                    |
| [RGBA64](/engine/6000.7/script-reference/unityengine/textureformat/rgba64.md)                          | Four channel (RGBA) texture format, 16-bits unsigned integer per channel.                              |
| [RGBA64\_SIGNED](/engine/6000.7/script-reference/unityengine/textureformat/rgba64-signed.md)           | Four channel (RGBA) texture format, 16-bits signed integer per channel.                                |
| [RGBAFloat](/engine/6000.7/script-reference/unityengine/textureformat/rgbafloat.md)                    | RGB color and alpha texture format,  32-bit floats per channel.                                        |
| [RGBAHalf](/engine/6000.7/script-reference/unityengine/textureformat/rgbahalf.md)                      | RGB color and alpha texture format, 16 bit floating point per channel.                                 |
| [RGFloat](/engine/6000.7/script-reference/unityengine/textureformat/rgfloat.md)                        | Two color (RG)  texture format, 32 bit floating point per channel.                                     |
| [RGHalf](/engine/6000.7/script-reference/unityengine/textureformat/rghalf.md)                          | Two color (RG)  texture format, 16 bit floating point per channel.                                     |
| [RHalf](/engine/6000.7/script-reference/unityengine/textureformat/rhalf.md)                            | Scalar (R)  texture format, 16 bit floating point.                                                     |
| [YUY2](/engine/6000.7/script-reference/unityengine/textureformat/yuy2.md)                              | A format that uses the YUV color space and is often used for video encoding or playback.               |
