Skip to main content

TextureFormat

Enum TextureFormat 

Source
#[repr(C)]
pub enum TextureFormat {
Show 97 variants R8Unorm = 0, R8Snorm = 1, R8Uint = 2, R8Sint = 3, R16Uint = 4, R16Sint = 5, R16Unorm = 6, R16Snorm = 7, R16Float = 8, Rg8Unorm = 9, Rg8Snorm = 10, Rg8Uint = 11, Rg8Sint = 12, R32Uint = 13, R32Sint = 14, R32Float = 15, Rg16Uint = 16, Rg16Sint = 17, Rg16Unorm = 18, Rg16Snorm = 19, Rg16Float = 20, Rgba8Unorm = 21, Rgba8UnormSrgb = 22, Rgba8Snorm = 23, Rgba8Uint = 24, Rgba8Sint = 25, Bgra8Unorm = 26, Bgra8UnormSrgb = 27, Rgb10a2Unorm = 28, Rg11b10Float = 29, Rg32Uint = 30, Rg32Sint = 31, Rg32Float = 32, Rgba16Uint = 33, Rgba16Sint = 34, Rgba16Unorm = 35, Rgba16Snorm = 36, Rgba16Float = 37, Rgba32Uint = 38, Rgba32Sint = 39, Rgba32Float = 40, Depth32Float = 41, Depth24Plus = 42, Depth24PlusStencil8 = 43, Rgb9e5Ufloat = 44, Bc1RgbaUnorm = 45, Bc1RgbaUnormSrgb = 46, Bc2RgbaUnorm = 47, Bc2RgbaUnormSrgb = 48, Bc3RgbaUnorm = 49, Bc3RgbaUnormSrgb = 50, Bc4RUnorm = 51, Bc4RSnorm = 52, Bc5RgUnorm = 53, Bc5RgSnorm = 54, Bc6hRgbUfloat = 55, Bc6hRgbSfloat = 56, Bc7RgbaUnorm = 57, Bc7RgbaUnormSrgb = 58, Etc2Rgb8Unorm = 59, Etc2Rgb8UnormSrgb = 60, Etc2Rgb8A1Unorm = 61, Etc2Rgb8A1UnormSrgb = 62, Etc2Rgba8Unorm = 63, Etc2Rgba8UnormSrgb = 64, EacR11Unorm = 65, EacR11Snorm = 66, EacRg11Unorm = 67, EacRg11Snorm = 68, Astc4x4RgbaUnorm = 69, Astc4x4RgbaUnormSrgb = 70, Astc5x4RgbaUnorm = 71, Astc5x4RgbaUnormSrgb = 72, Astc5x5RgbaUnorm = 73, Astc5x5RgbaUnormSrgb = 74, Astc6x5RgbaUnorm = 75, Astc6x5RgbaUnormSrgb = 76, Astc6x6RgbaUnorm = 77, Astc6x6RgbaUnormSrgb = 78, Astc8x5RgbaUnorm = 79, Astc8x5RgbaUnormSrgb = 80, Astc8x6RgbaUnorm = 81, Astc8x6RgbaUnormSrgb = 82, Astc10x5RgbaUnorm = 83, Astc10x5RgbaUnormSrgb = 84, Astc10x6RgbaUnorm = 85, Astc10x6RgbaUnormSrgb = 86, Astc8x8RgbaUnorm = 87, Astc8x8RgbaUnormSrgb = 88, Astc10x8RgbaUnorm = 89, Astc10x8RgbaUnormSrgb = 90, Astc10x10RgbaUnorm = 91, Astc10x10RgbaUnormSrgb = 92, Astc12x10RgbaUnorm = 93, Astc12x10RgbaUnormSrgb = 94, Astc12x12RgbaUnorm = 95, Astc12x12RgbaUnormSrgb = 96,
}
Expand description

Underlying texture data format.

If there is a conversion in the format (such as srgb -> linear), The conversion listed is for loading from texture in a shader. When writing to the texture, the opposite conversion takes place.

Variants§

§

R8Unorm = 0

Red channel only. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.

§

R8Snorm = 1

Red channel only. 8 bit integer per channel. [-127, 127] converted to/from float [-1, 1] in shader.

§

R8Uint = 2

Red channel only. 8 bit integer per channel. Unsigned in shader.

§

R8Sint = 3

Red channel only. 8 bit integer per channel. Signed in shader.

§

R16Uint = 4

Red channel only. 16 bit integer per channel. Unsigned in shader.

§

R16Sint = 5

Red channel only. 16 bit integer per channel. Signed in shader.

§

R16Unorm = 6

Red channel only. 16 bit integer per channel. [0, 65535] converted to/from float [0, 1] in shader.

Features::TEXTURE_FORMAT_16BIT_NORM must be enabled to use this texture format.

§

R16Snorm = 7

Red channel only. 16 bit integer per channel. [0, 65535] converted to/from float [-1, 1] in shader.

Features::TEXTURE_FORMAT_16BIT_NORM must be enabled to use this texture format.

§

R16Float = 8

Red channel only. 16 bit float per channel. Float in shader.

§

Rg8Unorm = 9

Red and green channels. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.

§

Rg8Snorm = 10

Red and green channels. 8 bit integer per channel. [-127, 127] converted to/from float [-1, 1] in shader.

§

Rg8Uint = 11

Red and green channels. 8 bit integer per channel. Unsigned in shader.

§

Rg8Sint = 12

Red and green channels. 8 bit integer per channel. Signed in shader.

§

R32Uint = 13

Red channel only. 32 bit integer per channel. Unsigned in shader.

§

R32Sint = 14

Red channel only. 32 bit integer per channel. Signed in shader.

§

R32Float = 15

Red channel only. 32 bit float per channel. Float in shader.

§

Rg16Uint = 16

Red and green channels. 16 bit integer per channel. Unsigned in shader.

§

Rg16Sint = 17

Red and green channels. 16 bit integer per channel. Signed in shader.

§

Rg16Unorm = 18

Red and green channels. 16 bit integer per channel. [0, 65535] converted to/from float [0, 1] in shader.

Features::TEXTURE_FORMAT_16BIT_NORM must be enabled to use this texture format.

§

Rg16Snorm = 19

Red and green channels. 16 bit integer per channel. [0, 65535] converted to/from float [-1, 1] in shader.

Features::TEXTURE_FORMAT_16BIT_NORM must be enabled to use this texture format.

§

Rg16Float = 20

Red and green channels. 16 bit float per channel. Float in shader.

§

Rgba8Unorm = 21

Red, green, blue, and alpha channels. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.

§

Rgba8UnormSrgb = 22

Red, green, blue, and alpha channels. 8 bit integer per channel. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.

§

Rgba8Snorm = 23

Red, green, blue, and alpha channels. 8 bit integer per channel. [-127, 127] converted to/from float [-1, 1] in shader.

§

Rgba8Uint = 24

Red, green, blue, and alpha channels. 8 bit integer per channel. Unsigned in shader.

§

Rgba8Sint = 25

Red, green, blue, and alpha channels. 8 bit integer per channel. Signed in shader.

§

Bgra8Unorm = 26

Blue, green, red, and alpha channels. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.

§

Bgra8UnormSrgb = 27

Blue, green, red, and alpha channels. 8 bit integer per channel. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.

§

Rgb10a2Unorm = 28

Red, green, blue, and alpha channels. 10 bit integer for RGB channels, 2 bit integer for alpha channel. [0, 1023] ([0, 3] for alpha) converted to/from float [0, 1] in shader.

§

Rg11b10Float = 29

Red, green, and blue channels. 11 bit float with no sign bit for RG channels. 10 bit float with no sign bit for blue channel. Float in shader.

§

Rg32Uint = 30

Red and green channels. 32 bit integer per channel. Unsigned in shader.

§

Rg32Sint = 31

Red and green channels. 32 bit integer per channel. Signed in shader.

§

Rg32Float = 32

Red and green channels. 32 bit float per channel. Float in shader.

§

Rgba16Uint = 33

Red, green, blue, and alpha channels. 16 bit integer per channel. Unsigned in shader.

§

Rgba16Sint = 34

Red, green, blue, and alpha channels. 16 bit integer per channel. Signed in shader.

§

Rgba16Unorm = 35

Red, green, blue, and alpha channels. 16 bit integer per channel. [0, 65535] converted to/from float [0, 1] in shader.

Features::TEXTURE_FORMAT_16BIT_NORM must be enabled to use this texture format.

§

Rgba16Snorm = 36

Red, green, blue, and alpha. 16 bit integer per channel. [0, 65535] converted to/from float [-1, 1] in shader.

Features::TEXTURE_FORMAT_16BIT_NORM must be enabled to use this texture format.

§

Rgba16Float = 37

Red, green, blue, and alpha channels. 16 bit float per channel. Float in shader.

§

Rgba32Uint = 38

Red, green, blue, and alpha channels. 32 bit integer per channel. Unsigned in shader.

§

Rgba32Sint = 39

Red, green, blue, and alpha channels. 32 bit integer per channel. Signed in shader.

§

Rgba32Float = 40

Red, green, blue, and alpha channels. 32 bit float per channel. Float in shader.

§

Depth32Float = 41

Special depth format with 32 bit floating point depth.

§

Depth24Plus = 42

Special depth format with at least 24 bit integer depth.

§

Depth24PlusStencil8 = 43

Special depth/stencil format with at least 24 bit integer depth and 8 bits integer stencil.

§

Rgb9e5Ufloat = 44

Packed unsigned float with 9 bits mantisa for each RGB component, then a common 5 bits exponent

§

Bc1RgbaUnorm = 45

4x4 block compressed texture. 8 bytes per block (4 bit/px). 4 color + alpha pallet. 5 bit R + 6 bit G + 5 bit B + 1 bit alpha. [0, 63] ([0, 1] for alpha) converted to/from float [0, 1] in shader.

Also known as DXT1.

Features::TEXTURE_COMPRESSION_BC must be enabled to use this texture format.

§

Bc1RgbaUnormSrgb = 46

4x4 block compressed texture. 8 bytes per block (4 bit/px). 4 color + alpha pallet. 5 bit R + 6 bit G + 5 bit B + 1 bit alpha. Srgb-color [0, 63] ([0, 1] for alpha) converted to/from linear-color float [0, 1] in shader.

Also known as DXT1.

Features::TEXTURE_COMPRESSION_BC must be enabled to use this texture format.

§

Bc2RgbaUnorm = 47

4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet. 5 bit R + 6 bit G + 5 bit B + 4 bit alpha. [0, 63] ([0, 15] for alpha) converted to/from float [0, 1] in shader.

Also known as DXT3.

Features::TEXTURE_COMPRESSION_BC must be enabled to use this texture format.

§

Bc2RgbaUnormSrgb = 48

4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet. 5 bit R + 6 bit G + 5 bit B + 4 bit alpha. Srgb-color [0, 63] ([0, 255] for alpha) converted to/from linear-color float [0, 1] in shader.

Also known as DXT3.

Features::TEXTURE_COMPRESSION_BC must be enabled to use this texture format.

§

Bc3RgbaUnorm = 49

4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet + 8 alpha pallet. 5 bit R + 6 bit G + 5 bit B + 8 bit alpha. [0, 63] ([0, 255] for alpha) converted to/from float [0, 1] in shader.

Also known as DXT5.

Features::TEXTURE_COMPRESSION_BC must be enabled to use this texture format.

§

Bc3RgbaUnormSrgb = 50

4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet + 8 alpha pallet. 5 bit R + 6 bit G + 5 bit B + 8 bit alpha. Srgb-color [0, 63] ([0, 255] for alpha) converted to/from linear-color float [0, 1] in shader.

Also known as DXT5.

Features::TEXTURE_COMPRESSION_BC must be enabled to use this texture format.

§

Bc4RUnorm = 51

4x4 block compressed texture. 8 bytes per block (4 bit/px). 8 color pallet. 8 bit R. [0, 255] converted to/from float [0, 1] in shader.

Also known as RGTC1.

Features::TEXTURE_COMPRESSION_BC must be enabled to use this texture format.

§

Bc4RSnorm = 52

4x4 block compressed texture. 8 bytes per block (4 bit/px). 8 color pallet. 8 bit R. [-127, 127] converted to/from float [-1, 1] in shader.

Also known as RGTC1.

Features::TEXTURE_COMPRESSION_BC must be enabled to use this texture format.

§

Bc5RgUnorm = 53

4x4 block compressed texture. 16 bytes per block (8 bit/px). 8 color red pallet + 8 color green pallet. 8 bit RG. [0, 255] converted to/from float [0, 1] in shader.

Also known as RGTC2.

Features::TEXTURE_COMPRESSION_BC must be enabled to use this texture format.

§

Bc5RgSnorm = 54

4x4 block compressed texture. 16 bytes per block (8 bit/px). 8 color red pallet + 8 color green pallet. 8 bit RG. [-127, 127] converted to/from float [-1, 1] in shader.

Also known as RGTC2.

Features::TEXTURE_COMPRESSION_BC must be enabled to use this texture format.

§

Bc6hRgbUfloat = 55

4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 16 bit unsigned float RGB. Float in shader.

Also known as BPTC (float).

Features::TEXTURE_COMPRESSION_BC must be enabled to use this texture format.

§

Bc6hRgbSfloat = 56

4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 16 bit signed float RGB. Float in shader.

Also known as BPTC (float).

Features::TEXTURE_COMPRESSION_BC must be enabled to use this texture format.

§

Bc7RgbaUnorm = 57

4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 8 bit integer RGBA. [0, 255] converted to/from float [0, 1] in shader.

Also known as BPTC (unorm).

Features::TEXTURE_COMPRESSION_BC must be enabled to use this texture format.

§

Bc7RgbaUnormSrgb = 58

4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 8 bit integer RGBA. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.

Also known as BPTC (unorm).

Features::TEXTURE_COMPRESSION_BC must be enabled to use this texture format.

§

Etc2Rgb8Unorm = 59

4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB. [0, 255] converted to/from float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ETC2 must be enabled to use this texture format.

§

Etc2Rgb8UnormSrgb = 60

4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ETC2 must be enabled to use this texture format.

§

Etc2Rgb8A1Unorm = 61

4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB + 1 bit alpha. [0, 255] ([0, 1] for alpha) converted to/from float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ETC2 must be enabled to use this texture format.

§

Etc2Rgb8A1UnormSrgb = 62

4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB + 1 bit alpha. Srgb-color [0, 255] ([0, 1] for alpha) converted to/from linear-color float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ETC2 must be enabled to use this texture format.

§

Etc2Rgba8Unorm = 63

4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 8 bit integer RGB + 8 bit alpha. [0, 255] converted to/from float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ETC2 must be enabled to use this texture format.

§

Etc2Rgba8UnormSrgb = 64

4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 8 bit integer RGB + 8 bit alpha. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ETC2 must be enabled to use this texture format.

§

EacR11Unorm = 65

4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 11 bit integer R. [0, 255] converted to/from float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ETC2 must be enabled to use this texture format.

§

EacR11Snorm = 66

4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 11 bit integer R. [-127, 127] converted to/from float [-1, 1] in shader.

Features::TEXTURE_COMPRESSION_ETC2 must be enabled to use this texture format.

§

EacRg11Unorm = 67

4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 11 bit integer R + 11 bit integer G. [0, 255] converted to/from float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ETC2 must be enabled to use this texture format.

§

EacRg11Snorm = 68

4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 11 bit integer R + 11 bit integer G. [-127, 127] converted to/from float [-1, 1] in shader.

Features::TEXTURE_COMPRESSION_ETC2 must be enabled to use this texture format.

§

Astc4x4RgbaUnorm = 69

4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 8 bit integer RGBA. [0, 255] converted to/from float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc4x4RgbaUnormSrgb = 70

4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 8 bit integer RGBA. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc5x4RgbaUnorm = 71

5x4 block compressed texture. 16 bytes per block (6.4 bit/px). Complex pallet. 8 bit integer RGBA. [0, 255] converted to/from float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc5x4RgbaUnormSrgb = 72

5x4 block compressed texture. 16 bytes per block (6.4 bit/px). Complex pallet. 8 bit integer RGBA. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc5x5RgbaUnorm = 73

5x5 block compressed texture. 16 bytes per block (5.12 bit/px). Complex pallet. 8 bit integer RGBA. [0, 255] converted to/from float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc5x5RgbaUnormSrgb = 74

5x5 block compressed texture. 16 bytes per block (5.12 bit/px). Complex pallet. 8 bit integer RGBA. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc6x5RgbaUnorm = 75

6x5 block compressed texture. 16 bytes per block (4.27 bit/px). Complex pallet. 8 bit integer RGBA. [0, 255] converted to/from float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc6x5RgbaUnormSrgb = 76

6x5 block compressed texture. 16 bytes per block (4.27 bit/px). Complex pallet. 8 bit integer RGBA. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc6x6RgbaUnorm = 77

6x6 block compressed texture. 16 bytes per block (3.56 bit/px). Complex pallet. 8 bit integer RGBA. [0, 255] converted to/from float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc6x6RgbaUnormSrgb = 78

6x6 block compressed texture. 16 bytes per block (3.56 bit/px). Complex pallet. 8 bit integer RGBA. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc8x5RgbaUnorm = 79

8x5 block compressed texture. 16 bytes per block (3.2 bit/px). Complex pallet. 8 bit integer RGBA. [0, 255] converted to/from float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc8x5RgbaUnormSrgb = 80

8x5 block compressed texture. 16 bytes per block (3.2 bit/px). Complex pallet. 8 bit integer RGBA. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc8x6RgbaUnorm = 81

8x6 block compressed texture. 16 bytes per block (2.67 bit/px). Complex pallet. 8 bit integer RGBA. [0, 255] converted to/from float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc8x6RgbaUnormSrgb = 82

8x6 block compressed texture. 16 bytes per block (2.67 bit/px). Complex pallet. 8 bit integer RGBA. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc10x5RgbaUnorm = 83

10x5 block compressed texture. 16 bytes per block (2.56 bit/px). Complex pallet. 8 bit integer RGBA. [0, 255] converted to/from float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc10x5RgbaUnormSrgb = 84

10x5 block compressed texture. 16 bytes per block (2.56 bit/px). Complex pallet. 8 bit integer RGBA. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc10x6RgbaUnorm = 85

10x6 block compressed texture. 16 bytes per block (2.13 bit/px). Complex pallet. 8 bit integer RGBA. [0, 255] converted to/from float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc10x6RgbaUnormSrgb = 86

10x6 block compressed texture. 16 bytes per block (2.13 bit/px). Complex pallet. 8 bit integer RGBA. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc8x8RgbaUnorm = 87

8x8 block compressed texture. 16 bytes per block (2 bit/px). Complex pallet. 8 bit integer RGBA. [0, 255] converted to/from float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc8x8RgbaUnormSrgb = 88

8x8 block compressed texture. 16 bytes per block (2 bit/px). Complex pallet. 8 bit integer RGBA. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc10x8RgbaUnorm = 89

10x8 block compressed texture. 16 bytes per block (1.6 bit/px). Complex pallet. 8 bit integer RGBA. [0, 255] converted to/from float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc10x8RgbaUnormSrgb = 90

10x8 block compressed texture. 16 bytes per block (1.6 bit/px). Complex pallet. 8 bit integer RGBA. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc10x10RgbaUnorm = 91

10x10 block compressed texture. 16 bytes per block (1.28 bit/px). Complex pallet. 8 bit integer RGBA. [0, 255] converted to/from float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc10x10RgbaUnormSrgb = 92

10x10 block compressed texture. 16 bytes per block (1.28 bit/px). Complex pallet. 8 bit integer RGBA. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc12x10RgbaUnorm = 93

12x10 block compressed texture. 16 bytes per block (1.07 bit/px). Complex pallet. 8 bit integer RGBA. [0, 255] converted to/from float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc12x10RgbaUnormSrgb = 94

12x10 block compressed texture. 16 bytes per block (1.07 bit/px). Complex pallet. 8 bit integer RGBA. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc12x12RgbaUnorm = 95

12x12 block compressed texture. 16 bytes per block (0.89 bit/px). Complex pallet. 8 bit integer RGBA. [0, 255] converted to/from float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

§

Astc12x12RgbaUnormSrgb = 96

12x12 block compressed texture. 16 bytes per block (0.89 bit/px). Complex pallet. 8 bit integer RGBA. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.

Features::TEXTURE_COMPRESSION_ASTC_LDR must be enabled to use this texture format.

Implementations§

Source§

impl TextureFormat

Source

pub fn describe(&self) -> TextureFormatInfo

Get useful information about the texture format.

Trait Implementations§

Source§

impl Clone for TextureFormat

Source§

fn clone(&self) -> TextureFormat

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for TextureFormat

Source§

impl Debug for TextureFormat

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Eq for TextureFormat

Source§

impl Hash for TextureFormat

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for TextureFormat

Source§

fn eq(&self, other: &TextureFormat) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TextureFormat

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.