#[repr(i32)]pub enum PixelFormat {
Show 16 variants
R8 = 0,
R16 = 1,
R32F = 2,
RG8 = 3,
RG16 = 4,
RG32F = 5,
RGBA8 = 6,
RGBA16 = 7,
RGBA32F = 8,
BC1 = 9,
BC2 = 10,
BC3 = 11,
BC4 = 12,
BC5 = 13,
BC6H = 14,
BC7 = 15,
}Expand description
GPU pixel / block-compression format.
Uncompressed formats store one pixel per “block”; BCn formats store a 4×4 pixel tile per block.
Variants§
R8 = 0
8-bit single channel (1 byte per pixel).
R16 = 1
16-bit single channel UNORM (2 bytes per pixel).
R32F = 2
Single-precision single channel (4 bytes per pixel).
RG8 = 3
8-bit dual channel (2 bytes per pixel).
RG16 = 4
16-bit dual channel UNORM (4 bytes per pixel).
RG32F = 5
Single-precision dual channel (8 bytes per pixel).
RGBA8 = 6
8-bit RGBA (4 bytes per pixel).
RGBA16 = 7
16-bit RGBA UNORM (8 bytes per pixel).
RGBA32F = 8
Single-precision RGBA (16 bytes per pixel).
BC1 = 9
DXT1 – 8 bytes per 4×4 block (RGB + optional 1-bit alpha).
BC2 = 10
DXT3 – 16 bytes per 4×4 block (explicit 4-bit alpha).
BC3 = 11
DXT5 – 16 bytes per 4×4 block (interpolated alpha).
BC4 = 12
Single-channel – 8 bytes per 4×4 block.
BC5 = 13
Dual-channel – 16 bytes per 4×4 block.
BC6H = 14
HDR RGB – 16 bytes per 4×4 block (half-float output).
BC7 = 15
High-quality RGBA – 16 bytes per 4×4 block.
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
Source§fn clone(&self) -> PixelFormat
fn clone(&self) -> PixelFormat
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more