Skip to main content

bc5_float

Function bc5_float 

Source
pub fn bc5_float(
    compressed_block: &[u8],
    decompressed_block: &mut [f32],
    destination_pitch: usize,
    is_signed: bool,
)
Expand description

Decode 16 bytes from compressed_block to RG Float32 with destination_pitch many floats per output row.

ยงExamples

// Decode a single 4x4 pixel block.
let compressed_block = [0u8; 16];
let mut decompressed_block = [0.0f32; 4 * 4 * 2];
bcdec_rs::bc5_float(&compressed_block, &mut decompressed_block, 4 * 2, false);