Skip to main content

texture_format_to_code

Function texture_format_to_code 

Source
pub fn texture_format_to_code(format: TextureFormat) -> Option<u8>
Expand description

Encode a TextureFormat as a 5-bit code for use in pipeline key bitfields.

Covers all WebGPU renderable and blendable texture formats. Some of them need optional features. See https://gpuweb.github.io/gpuweb/#plain-color-formats.