public static class WebGpuFormatsThe RHI's formats in WebGPU's terms.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Pure functions with no device in sight, and deliberately so: this is the half of a backend that can be tested without an implementation, and it is also the half where a mistake is silent. A format mapped to the wrong WebGPU enum does not fail — it renders the wrong colours, or samples a normal map as sRGB, and the bug is found by eye weeks later.
WebGPU's format list is shorter than Vulkan's, and the gaps are not oversights: it has no 16-bit normalised formats at all, and no fixed-point 24-bit depth. Each is named below with what happens instead, because "returns Undefined" at a call site three layers away is a worse answer than a sentence here.
Fields and properties (1)
public const int SupportedSampleCountsThe sample counts WebGPU guarantees, as the RHI's bit mask.
Methods (7)
public static WgpuTextureFormat ToWebGpu(this PixelFormat format)The WebGPU format for one of ours.
public static PixelFormat ToEngine(this WgpuTextureFormat format)One of ours for a WebGPU format.
public static WgpuTextureFormat Require(this PixelFormat format, string what)The WebGPU format, or an exception naming what is missing.
public static bool CanCopy(this PixelFormat format)Whether a texture in this format may take part in a buffer copy.
public static WgpuVertexFormat ToWebGpu(this VertexFormat format)The WebGPU vertex format for one of ours.
public static WgpuTextureSampleType SampleType(this PixelFormat format, bool float32Filterable)How a texture in this format is read by a shader.
public static WgpuTextureAspect SampledAspect(this PixelFormat format)Which planes of a texture in this format a view covers.
Used by (6)
- WebGpuCapabilitiesVixen.Graphics.WebGPU
- WebGpuCommandListVixen.Graphics.WebGPU
- WebGpuConversionTestsVixen.Graphics.WebGPU.Tests
- WebGpuConversionsVixen.Graphics.WebGPU
- WebGpuDeviceVixen.Graphics.WebGPU
- WebGpuSwapChainVixen.Graphics.WebGPU