#[repr(i32)]pub enum TranscoderBlockFormat {
Show 30 variants
ETC1 = 0,
ETC2_RGBA = 1,
BC1 = 2,
BC3 = 3,
BC4 = 4,
BC5 = 5,
PVRTC1_4_RGB = 6,
PVRTC1_4_RGBA = 7,
BC7 = 8,
BC7_M5_COLOR = 9,
BC7_M5_ALPHA = 10,
ETC2_EAC_A8 = 11,
ASTC_4x4 = 12,
ATC_RGB = 13,
ATC_RGBA_INTERPOLATED_ALPHA = 14,
FXT1_RGB = 15,
PVRTC2_4_RGB = 16,
PVRTC2_4_RGBA = 17,
ETC2_EAC_R11 = 18,
ETC2_EAC_RG11 = 19,
Indices = 20,
RGB32 = 21,
RGBA32 = 22,
A32 = 23,
RGB565 = 24,
BGR565 = 25,
RGBA4444_COLOR = 26,
RGBA4444_ALPHA = 27,
RGBA4444_COLOR_OPAQUE = 28,
RGBA4444 = 29,
}
Expand description
The block format to transcode universal texture data into
Variants§
ETC1 = 0
ETC1S RGB
ETC2_RGBA = 1
full ETC2 EAC RGBA8 block
BC1 = 2
DXT1 RGB
BC3 = 3
BC4 block followed by a four color BC1 block
BC4 = 4
DXT5A (alpha block only)
BC5 = 5
two BC4 blocks
PVRTC1_4_RGB = 6
opaque-only PVRTC1 4bpp
PVRTC1_4_RGBA = 7
PVRTC1 4bpp RGBA
BC7 = 8
Full BC7 block, any mode
BC7_M5_COLOR = 9
RGB BC7 mode 5 color (writes an opaque mode 5 block)
BC7_M5_ALPHA = 10
alpha portion of BC7 mode 5 (cBC7_M5_COLOR output data must have been written to the output buffer first to set the mode/rot fields etc.)
ETC2_EAC_A8 = 11
alpha block of ETC2 EAC (first 8 bytes of the 16-bit ETC2 EAC RGBA format)
ASTC_4x4 = 12
ASTC 4x4 (either color-only or color+alpha). Note that the transcoder always currently assumes sRGB is not enabled when outputting ASTC data. If you use a sRGB ASTC format you’ll get ~1 LSB of additional error, because of the different way ASTC decoders scale 8-bit endpoints to 16-bits during unpacking.
ATC_RGB = 13
ATC_RGBA_INTERPOLATED_ALPHA = 14
FXT1_RGB = 15
Opaque-only, has oddball 8x4 pixel block size
PVRTC2_4_RGB = 16
PVRTC2_4_RGBA = 17
ETC2_EAC_R11 = 18
ETC2_EAC_RG11 = 19
Indices = 20
Used internally: Write 16-bit endpoint and selector indices directly to output (output block must be at least 32-bits)
RGB32 = 21
Writes RGB components to 32bpp output pixels
RGBA32 = 22
Writes RGB255 components to 32bpp output pixels
A32 = 23
Writes alpha component to 32bpp output pixels
RGB565 = 24
BGR565 = 25
RGBA4444_COLOR = 26
RGBA4444_ALPHA = 27
RGBA4444_COLOR_OPAQUE = 28
RGBA4444 = 29
Implementations§
Source§impl TranscoderBlockFormat
impl TranscoderBlockFormat
Sourcepub fn bytes_per_block_or_pixel(self) -> u32
pub fn bytes_per_block_or_pixel(self) -> u32
For compressed texture formats, this returns the # of bytes per block. For uncompressed, it returns the # of bytes per pixel.
Sourcepub fn format_name(self) -> &'static str
pub fn format_name(self) -> &'static str
Returns format’s name in ASCII
Sourcepub fn is_compressed(self) -> bool
pub fn is_compressed(self) -> bool
Returns true if the block format is a compressed format.
Sourcepub fn block_width(self) -> u32
pub fn block_width(self) -> u32
Returns the block width for the specified texture format, which is currently either 4 or 8 for FXT1.
Sourcepub fn block_height(self) -> u32
pub fn block_height(self) -> u32
Returns the block height for the specified texture format, which is currently always 4.
Sourcepub fn calculate_minimum_output_buffer_blocks_or_pixels(
self,
original_width: u32,
original_height: u32,
total_slice_blocks: u32,
output_row_pitch_in_blocks_or_pixels: Option<u32>,
output_rows_in_pixels: Option<u32>,
) -> u32
pub fn calculate_minimum_output_buffer_blocks_or_pixels( self, original_width: u32, original_height: u32, total_slice_blocks: u32, output_row_pitch_in_blocks_or_pixels: Option<u32>, output_rows_in_pixels: Option<u32>, ) -> u32
Calculate the minimum output buffer required to store transcoded data in blocks for compressed formats and pixels for uncompressed formats
Trait Implementations§
Source§impl Clone for TranscoderBlockFormat
impl Clone for TranscoderBlockFormat
Source§fn clone(&self) -> TranscoderBlockFormat
fn clone(&self) -> TranscoderBlockFormat
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more