Crate pixel_formats

Source
Expand description

Structs for various pixels formats.

Format types expose public fields where possible, though formats with bitpacked data must use accessor methods.

The docs for each type have notes on the appropriate constants to let that type be used with GL or VK.

Structs§

GbaColor
RGB 5-bit per channel (bitpacked) linear(?) color data.
r8_Srgb
sRGB encoded Red data, u8.
r8_Unorm
Linear Red data, u8.
r8g8b8_Srgb
sRGB encoded RGB data, u8 per channel.
r8g8b8_Unorm
Linear RGB data, u8 per channel.
r8g8b8a8_Srgb
sRGB encoded RGB data + linear alpha, u8 per channel.
r8g8b8a8_Unorm
Linear RGBA data, u8 per channel.
r16_Unorm
Linear Red data, u16.
r16g16b16_Unorm
Linear RGB data, u16 per channel.
r16g16b16a16_Unorm
Linear RGBA data, u16 per channel.
r32_Sfloat
Linear R data, f32.
r32g32b32_Sfloat
Linear RGB data, f32 per channel.
r32g32b32a32_Sfloat
Linear RGBA data, f32 per channel.

Functions§

linear_f32_to_srgb_u8
Converts a linear f32 value into a u8 sRGB encoded value.
srgb_u8_to_linear_f32
Converts a u8 sRGB encoded value into linear f32 form.