Enum bevy::render::render_resource::TextureFormat
[−]#[repr(C)]
pub enum TextureFormat {
Show 97 variants
R8Unorm,
R8Snorm,
R8Uint,
R8Sint,
R16Uint,
R16Sint,
R16Unorm,
R16Snorm,
R16Float,
Rg8Unorm,
Rg8Snorm,
Rg8Uint,
Rg8Sint,
R32Uint,
R32Sint,
R32Float,
Rg16Uint,
Rg16Sint,
Rg16Unorm,
Rg16Snorm,
Rg16Float,
Rgba8Unorm,
Rgba8UnormSrgb,
Rgba8Snorm,
Rgba8Uint,
Rgba8Sint,
Bgra8Unorm,
Bgra8UnormSrgb,
Rgb10a2Unorm,
Rg11b10Float,
Rg32Uint,
Rg32Sint,
Rg32Float,
Rgba16Uint,
Rgba16Sint,
Rgba16Unorm,
Rgba16Snorm,
Rgba16Float,
Rgba32Uint,
Rgba32Sint,
Rgba32Float,
Depth32Float,
Depth24Plus,
Depth24PlusStencil8,
Rgb9e5Ufloat,
Bc1RgbaUnorm,
Bc1RgbaUnormSrgb,
Bc2RgbaUnorm,
Bc2RgbaUnormSrgb,
Bc3RgbaUnorm,
Bc3RgbaUnormSrgb,
Bc4RUnorm,
Bc4RSnorm,
Bc5RgUnorm,
Bc5RgSnorm,
Bc6hRgbUfloat,
Bc6hRgbSfloat,
Bc7RgbaUnorm,
Bc7RgbaUnormSrgb,
Etc2Rgb8Unorm,
Etc2Rgb8UnormSrgb,
Etc2Rgb8A1Unorm,
Etc2Rgb8A1UnormSrgb,
Etc2Rgba8Unorm,
Etc2Rgba8UnormSrgb,
EacR11Unorm,
EacR11Snorm,
EacRg11Unorm,
EacRg11Snorm,
Astc4x4RgbaUnorm,
Astc4x4RgbaUnormSrgb,
Astc5x4RgbaUnorm,
Astc5x4RgbaUnormSrgb,
Astc5x5RgbaUnorm,
Astc5x5RgbaUnormSrgb,
Astc6x5RgbaUnorm,
Astc6x5RgbaUnormSrgb,
Astc6x6RgbaUnorm,
Astc6x6RgbaUnormSrgb,
Astc8x5RgbaUnorm,
Astc8x5RgbaUnormSrgb,
Astc8x6RgbaUnorm,
Astc8x6RgbaUnormSrgb,
Astc10x5RgbaUnorm,
Astc10x5RgbaUnormSrgb,
Astc10x6RgbaUnorm,
Astc10x6RgbaUnormSrgb,
Astc8x8RgbaUnorm,
Astc8x8RgbaUnormSrgb,
Astc10x8RgbaUnorm,
Astc10x8RgbaUnormSrgb,
Astc10x10RgbaUnorm,
Astc10x10RgbaUnormSrgb,
Astc12x10RgbaUnorm,
Astc12x10RgbaUnormSrgb,
Astc12x12RgbaUnorm,
Astc12x12RgbaUnormSrgb,
}
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
Red channel only. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.
R8Snorm
Red channel only. 8 bit integer per channel. [-127, 127] converted to/from float [-1, 1] in shader.
R8Uint
Red channel only. 8 bit integer per channel. Unsigned in shader.
R8Sint
Red channel only. 8 bit integer per channel. Signed in shader.
R16Uint
Red channel only. 16 bit integer per channel. Unsigned in shader.
R16Sint
Red channel only. 16 bit integer per channel. Signed in shader.
R16Unorm
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
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
Red channel only. 16 bit float per channel. Float in shader.
Rg8Unorm
Red and green channels. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.
Rg8Snorm
Red and green channels. 8 bit integer per channel. [-127, 127] converted to/from float [-1, 1] in shader.
Rg8Uint
Red and green channels. 8 bit integer per channel. Unsigned in shader.
Rg8Sint
Red and green channels. 8 bit integer per channel. Signed in shader.
R32Uint
Red channel only. 32 bit integer per channel. Unsigned in shader.
R32Sint
Red channel only. 32 bit integer per channel. Signed in shader.
R32Float
Red channel only. 32 bit float per channel. Float in shader.
Rg16Uint
Red and green channels. 16 bit integer per channel. Unsigned in shader.
Rg16Sint
Red and green channels. 16 bit integer per channel. Signed in shader.
Rg16Unorm
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
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
Red and green channels. 16 bit float per channel. Float in shader.
Rgba8Unorm
Red, green, blue, and alpha channels. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.
Rgba8UnormSrgb
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
Red, green, blue, and alpha channels. 8 bit integer per channel. [-127, 127] converted to/from float [-1, 1] in shader.
Rgba8Uint
Red, green, blue, and alpha channels. 8 bit integer per channel. Unsigned in shader.
Rgba8Sint
Red, green, blue, and alpha channels. 8 bit integer per channel. Signed in shader.
Bgra8Unorm
Blue, green, red, and alpha channels. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.
Bgra8UnormSrgb
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
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
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
Red and green channels. 32 bit integer per channel. Unsigned in shader.
Rg32Sint
Red and green channels. 32 bit integer per channel. Signed in shader.
Rg32Float
Red and green channels. 32 bit float per channel. Float in shader.
Rgba16Uint
Red, green, blue, and alpha channels. 16 bit integer per channel. Unsigned in shader.
Rgba16Sint
Red, green, blue, and alpha channels. 16 bit integer per channel. Signed in shader.
Rgba16Unorm
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
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
Red, green, blue, and alpha channels. 16 bit float per channel. Float in shader.
Rgba32Uint
Red, green, blue, and alpha channels. 32 bit integer per channel. Unsigned in shader.
Rgba32Sint
Red, green, blue, and alpha channels. 32 bit integer per channel. Signed in shader.
Rgba32Float
Red, green, blue, and alpha channels. 32 bit float per channel. Float in shader.
Depth32Float
Special depth format with 32 bit floating point depth.
Depth24Plus
Special depth format with at least 24 bit integer depth.
Depth24PlusStencil8
Special depth/stencil format with at least 24 bit integer depth and 8 bits integer stencil.
Rgb9e5Ufloat
Packed unsigned float with 9 bits mantisa for each RGB component, then a common 5 bits exponent
Bc1RgbaUnorm
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
impl TextureFormat
impl TextureFormat
pub fn describe(&self) -> TextureFormatInfo
pub fn describe(&self) -> TextureFormatInfo
Get useful information about the texture format.
Trait Implementations
impl BevyDefault for TextureFormat
impl BevyDefault for TextureFormat
pub fn bevy_default() -> TextureFormat
impl Clone for TextureFormat
impl Clone for TextureFormat
pub fn clone(&self) -> TextureFormat
pub fn clone(&self) -> TextureFormat
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for TextureFormat
impl Debug for TextureFormat
impl From<TextureFormat> for FormatAspects
impl From<TextureFormat> for FormatAspects
pub fn from(format: TextureFormat) -> FormatAspects
pub fn from(format: TextureFormat) -> FormatAspects
Performs the conversion.
impl From<TextureFormat> for ColorTargetState
impl From<TextureFormat> for ColorTargetState
pub fn from(format: TextureFormat) -> ColorTargetState
pub fn from(format: TextureFormat) -> ColorTargetState
Performs the conversion.
impl Hash for TextureFormat
impl Hash for TextureFormat
impl PartialEq<TextureFormat> for TextureFormat
impl PartialEq<TextureFormat> for TextureFormat
impl TextureFormatPixelInfo for TextureFormat
impl TextureFormatPixelInfo for TextureFormat
pub fn pixel_info(&self) -> PixelInfo
pub fn pixel_info(&self) -> PixelInfo
Returns the pixel information of the format.
fn pixel_size(&self) -> usize
fn pixel_size(&self) -> usize
Returns the size of a pixel of the format.
impl Copy for TextureFormat
impl Eq for TextureFormat
impl StructuralEq for TextureFormat
impl StructuralPartialEq for TextureFormat
Auto Trait Implementations
impl RefUnwindSafe for TextureFormat
impl Send for TextureFormat
impl Sync for TextureFormat
impl Unpin for TextureFormat
impl UnwindSafe for TextureFormat
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘNotable traits for Box<I, A>impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘNotable traits for Box<I, A>impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> TypeData for T where
T: 'static + Send + Sync + Clone,
impl<T> TypeData for T where
T: 'static + Send + Sync + Clone,
pub fn clone_type_data(&self) -> Box<dyn TypeData + 'static, Global>ⓘNotable traits for Box<I, A>impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more