WGPU's TextureFormats

See https://docs.rs/wgpu/0.6.0/wgpu/enum.TextureFormat.html

In general, assume linear color space.

Suffixes

SuffixDescription
UnormFloat values in range [0, 1] are converted to the [0, 255] unsigned 8-bit range.
SnormFloat values in range [0, 1] are converted to the [-127, 127] signed 8-bit range.
FloatEach channel is a float, usually 16-bit or 32-bit
UintEach channel is assumed already an integer in the unsigned range [0, 255]
SintEach channel is assumed already an integer in the signed range [-127, 127]
SrgbAssumes the channel color in range [0, 255] is in Srgb-color space

Prefixes

PrefixDescription
R8Red channel with 8-bits per channel.
R16Red channel with 16-bits per channel.
R32Red channel with 32-bits per channel.
Rg8Red and green channel with 8-bits per channel.
Rg16Red and green channel with 16-bits per channel.
Rg32Red and green channel with 32-bits per channel.
Rgba8Red, green, blue, and alpha channels with 8-bits per channel.
Rgba16Red, green, blue, and alpha channels with 16-bits per channel.
Rgba32Red, green, blue, and alpha channels with 32-bits per channel.
Bgra8Blue, green, red, alpha channels (in that order) with 8-bits per channel.
Rgb10a2Red, green, blue channels with 10-bits per channel [0, 1023], plus a 2-bit [0, 3] alpha channel.
Rg11b10Red and green channel with 11-bits per channel, plus a blue channel with 10-bits. Typically these channels are floats.
Bc1 through Bc7These are texture compression formats. The data is assumed to be in a compressed state.

Special

FormatDescription
Depth32FloatSpecial depth format with 32-bit float depth.
Depth24PlusSpecial depth with at least 24-bit integer depth.
Depth24PlusStencil8Special depth/stencil format with at least 24-bit integer depth and 8-bit integer stencil.