Vixen
02b45cc4
csharp
public enum WgpuTextureFormat

A WebGPU texture format, with webgpu.h's numbering.

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

Remarks

Why this exists rather than Silk.NET.WebGPU.TextureFormat: the browser surface cannot reference Silk.NET at all — it reaches WebGPU through navigator.gpu — so the vocabulary the two surfaces share has to be the backend's own. Everything above IWebGpuBinding is written in these terms.

The values are webgpu.h's, so the native surface casts rather than switches, and the browser surface indexes a string table by the same number. WebGpuEnumAgreementTests asserts every one of them against Silk's, which is what makes the cast safe across a binding upgrade rather than merely convenient.

Fields and properties (59)

  • Undefined

    No format.

  • R8Unorm

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

  • R8Snorm

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

  • R8Uint

    One 8-bit unsigned integer channel.

  • R8Sint

    One 8-bit signed integer channel.

  • R16Uint

    One 16-bit unsigned integer channel.

  • R16Sint

    One 16-bit signed integer channel.

  • R16Float

    One 16-bit half-float channel.

  • Rg8Unorm

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

  • Rg8Snorm

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

  • Rg8Uint

    Two 8-bit unsigned integer channels.

  • Rg8Sint

    Two 8-bit signed integer channels.

  • R32Float

    One 32-bit float channel.

  • R32Uint

    One 32-bit unsigned integer channel.

  • R32Sint

    One 32-bit signed integer channel.

  • Rg16Uint

    Two 16-bit unsigned integer channels.

  • Rg16Sint

    Two 16-bit signed integer channels.

  • Rg16Float

    Two 16-bit half-float channels.

  • Rgba8Unorm

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

  • Rgba8UnormSrgb

    Four 8-bit channels, sRGB-encoded.

  • Rgba8Snorm

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

  • Rgba8Uint

    Four 8-bit unsigned integer channels.

  • Rgba8Sint

    Four 8-bit signed integer channels.

  • Bgra8Unorm

    Four 8-bit channels in BGRA order, [0, 1].

  • Bgra8UnormSrgb

    Four 8-bit channels in BGRA order, sRGB-encoded.

  • Rgb10A2Uint

    Ten bits per colour and two of alpha, as unsigned integers.

  • Rgb10A2Unorm

    Ten bits per colour and two of alpha, [0, 1].

  • Rg11B10Ufloat

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

  • Rgb9E5Ufloat

    Nine-bit mantissas with a shared five-bit exponent.

  • Rg32Float

    Two 32-bit float channels.

  • Rg32Uint

    Two 32-bit unsigned integer channels.

  • Rg32Sint

    Two 32-bit signed integer channels.

  • Rgba16Uint

    Four 16-bit unsigned integer channels.

  • Rgba16Sint

    Four 16-bit signed integer channels.

  • Rgba16Float

    Four 16-bit half-float channels.

  • Rgba32Float

    Four 32-bit float channels.

  • Rgba32Uint

    Four 32-bit unsigned integer channels.

  • Rgba32Sint

    Four 32-bit signed integer channels.

  • Stencil8

    An 8-bit stencil with no depth.

  • Depth16Unorm

    16-bit unsigned normalised depth.

  • Depth24Plus

    At least 24 bits of depth, of an implementation-chosen layout.

  • Depth24PlusStencil8

    At least 24 bits of depth with an 8-bit stencil.

  • Depth32Float

    32-bit float depth.

  • Depth32FloatStencil8

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

  • Bc1RgbaUnorm

    BC1 with one bit of alpha.

  • Bc1RgbaUnormSrgb

    BC1, sRGB-encoded.

  • Bc3RgbaUnorm

    BC3 with interpolated alpha.

  • Bc3RgbaUnormSrgb

    BC3, sRGB-encoded.

  • Bc4RUnorm

    BC4, one channel.

  • Bc5RgUnorm

    BC5, two channels.

  • Bc6HRgbUfloat

    BC6H, three HDR channels, unsigned.

  • Bc7RgbaUnorm

    BC7, colour and alpha.

  • Bc7RgbaUnormSrgb

    BC7, sRGB-encoded.

  • Etc2Rgb8A1Unorm

    ETC2 with one bit of alpha.

  • Etc2Rgba8Unorm

    ETC2 with full alpha.

  • Astc4X4Unorm

    ASTC with a 4×4 block.

  • Astc4X4UnormSrgb

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

  • Astc8X8Unorm

    ASTC with an 8×8 block.

  • Astc8X8UnormSrgb

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

Used by (14)

  • FakeWebGpuBindingVixen.Graphics.WebGPU.Tests
  • IWebGpuBindingVixen.Graphics.WebGPU
  • NativeWebGpuBindingVixen.Graphics.WebGPU
  • WebGpuConversionTestsVixen.Graphics.WebGPU.Tests
  • WebGpuConversionsVixen.Graphics.WebGPU
  • WebGpuEnumAgreementTestsVixen.Graphics.WebGPU.Tests
  • WebGpuFormatsVixen.Graphics.WebGPU
  • WebGpuSwapChainVixen.Graphics.WebGPU
  • WgpuBindGroupLayoutEntryVixen.Graphics.WebGPU
  • WgpuColourTargetStateVixen.Graphics.WebGPU
  • WgpuDepthStencilStateVixen.Graphics.WebGPU
  • WgpuSurfaceConfigurationVixen.Graphics.WebGPU
  • WgpuTextureDescriptorVixen.Graphics.WebGPU
  • WgpuTextureViewDescriptorVixen.Graphics.WebGPU