Vixen
02b45cc4
csharp
public enum PixelFormat

A texture or attachment format.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The set every backend can express, named the way Vulkan and WebGPU name them: channels, then bit depth, then interpretation. Rgba8UNorm is four eight-bit channels read as [0, 1]; Rgba8UNormSrgb is the same bits with the hardware doing the sRGB conversion on read and write.

Deliberately not exhaustive. Every format here is one the engine uses or the swapchain may hand us; a backend that supports more is not obliged to expose them, and a format nobody has a use for is a format nobody has tested. PixelFormats answers the questions the RHI actually asks — how big is a block, is it depth, is it sRGB — and a backend translates by table lookup.

Fields and properties (44)

  • Undefined

    No format. Not a valid attachment or texture format.

  • R8UNorm

    One 8-bit channel, [0, 1].

  • R8SNorm

    One 8-bit channel, [-1, 1].

  • R8UInt

    One 8-bit channel as an unsigned integer.

  • R8SInt

    One 8-bit channel as a signed integer.

  • Rg8UNorm

    Two 8-bit channels, [0, 1].

  • Rg8SNorm

    Two 8-bit channels, [-1, 1].

  • R16Float

    One 16-bit channel as a half float.

  • R16UInt

    One 16-bit channel as an unsigned integer.

  • R16UNorm

    One 16-bit channel, [0, 1].

  • Rgba8UNorm

    Four 8-bit channels, [0, 1].

  • Rgba8UNormSrgb

    Four 8-bit channels, [0, 1], sRGB-encoded.

  • Bgra8UNorm

    Four 8-bit channels in blue-green-red-alpha order, [0, 1].

  • Bgra8UNormSrgb

    Four 8-bit channels in blue-green-red-alpha order, sRGB-encoded.

  • Rgba8SNorm

    Four 8-bit channels, [-1, 1].

  • Rg16Float

    Two 16-bit channels as half floats.

  • R32Float

    One 32-bit channel as a float.

  • R32UInt

    One 32-bit channel as an unsigned integer.

  • Rgb10A2UNorm

    Ten bits each for red, green and blue and two for alpha, [0, 1].

  • Rg11B10Float

    Eleven bits each for red and green and ten for blue, as small floats.

  • Rgba16Float

    Four 16-bit channels as half floats.

  • Rg32Float

    Two 32-bit channels as floats.

  • Rgba16UNorm

    Four 16-bit channels, [0, 1].

  • Rgba32Float

    Four 32-bit channels as floats.

  • Rgba32UInt

    Four 32-bit channels as unsigned integers.

  • Depth16UNorm

    16-bit unsigned normalised depth.

  • Depth32Float

    32-bit float depth.

  • Depth24UNormStencil8

    24-bit unsigned normalised depth with an 8-bit stencil.

  • Depth32FloatStencil8

    32-bit float depth with an 8-bit stencil.

  • Bc1RgbaUNorm

    BC1 — colour with one bit of alpha, 0.5 bytes per pixel.

  • Bc1RgbaUNormSrgb

    BC1, sRGB-encoded.

  • Bc3RgbaUNorm

    BC3 — colour with interpolated alpha, 1 byte per pixel.

  • Bc3RgbaUNormSrgb

    BC3, sRGB-encoded.

  • Bc4RUNorm

    BC4 — one channel, 0.5 bytes per pixel.

  • Bc5RgUNorm

    BC5 — two channels, 1 byte per pixel. The normal-map format.

  • Bc6HRgbUFloat

    BC6H — three HDR channels, 1 byte per pixel.

  • Bc7RgbaUNorm

    BC7 — high-quality colour and alpha, 1 byte per pixel.

  • Bc7RgbaUNormSrgb

    BC7, sRGB-encoded.

  • Etc2Rgb8A1UNorm

    ETC2 — colour with one bit of alpha, 0.5 bytes per pixel. Mobile.

  • Etc2Rgba8UNorm

    ETC2 with full alpha, 1 byte per pixel. Mobile.

  • Astc4X4UNorm

    ASTC with a 4×4 block, 1 byte per pixel. Mobile.

  • Astc4X4UNormSrgb

    ASTC with a 4×4 block, sRGB-encoded.

  • Astc8X8UNorm

    ASTC with an 8×8 block, 0.25 bytes per pixel.

  • Astc8X8UNormSrgb

    ASTC with an 8×8 block, sRGB-encoded.

Used by (243, showing 40)

  • ArenaFrameThirdPersonShooter
  • PbrShowcaseGamePbrShowcase
  • SampleLogPbrShowcase
  • SampleLogVideoPlayback
  • SampleLogHelloTriangle
  • TriangleGameHelloTriangle
  • UiHostHelloUi
  • VideoGameVideoPlayback
  • VirtualGeometryGameVirtualGeometry
  • __SceneReadyStructPbrShowcase
  • AccelerationStructureTestsVixen.Graphics.Null.Tests
  • AmbientCombineTestsVixen.Rendering.PostFx.Tests
  • AssetTextureSourceTestsVixen.Engine.Renderer.Tests
  • AutoExposureRendererVixen.Rendering.PostFx
  • AutoExposureTestsVixen.Rendering.PostFx.Tests
  • BindlessFrameTestsVixen.Rendering.Tests
  • BindlessSamplingDeviceTestsVixen.Graphics.Golden.Tests
  • BindlessSetLayoutTestsVixen.Shaders.Tests
  • BindlessTableDeviceTestsVixen.Graphics.Golden.Tests
  • BindlessTableTestsVixen.Graphics.Tests
  • BlockCompressorVixen.Core.Imaging
  • BlockCompressorTestsVixen.Core.Imaging.Tests
  • BlockEncoderTestsVixen.Core.Imaging.Tests
  • BloomAssetVixen.Rendering.PostFx
  • BloomRendererVixen.Rendering.PostFx
  • BloomTestsVixen.Rendering.PostFx.Tests
  • BrdfLutVixen.Core.Imaging
  • ClusterResolveTestsVixen.Rendering.Tests
  • ClusteredLightingTestsVixen.Rendering.Tests
  • ClusteredShadingDeviceTestsVixen.Graphics.Golden.Tests
  • ColourTargetStateVixen.Graphics
  • CommandRecorderTestsVixen.Graphics.Null.Tests
  • CompositorAssetTestsVixen.Rendering.Tests
  • CompositorFrameVixen.Rendering
  • CompositorImageTestsVixen.Graphics.Golden.Tests
  • CubeMapVixen.Core.Imaging
  • DataFormatDescriptorVixen.Core.Imaging
  • DebugDrawImageTestsVixen.Graphics.Golden.Tests
  • DepthOfFieldAssetVixen.Rendering.PostFx
  • DepthPrepassTestsVixen.Rendering.Tests