public static class ImageFormatsThe storage-image formats Raven admits.
Remarks
A format is required on a storage image rather than optional, and that is the decision worth recording. GLSL needs the layout qualifier on any image that is read, and SPIR-V needs a known ImageFormat or the module has to declare StorageImageReadWithoutFormat — a capability not every device offers. Requiring it means the same declaration compiles everywhere and the host knows exactly what to create the view as.
A subset rather than all forty: these are the ones a post-process or a VFX dispatch actually writes. Adding one is a line here and nothing else.
⚠ Thirteen of the sixteen are in Vulkan's list of formats that must support storage, and this paragraph used to claim all sixteen were. The mandatory set is R32_{UINT,SINT,SFLOAT}, R32G32B32A32_{UINT,SINT,SFLOAT}, R16G16B16A16_{UINT,SINT,SFLOAT} and R8G8B8A8_{UNORM,SNORM,UINT,SINT} — which does cover rgba8_snorm, so the exceptions are exactly rg32f, rg16f and r16f. Those three are the extended list, and a device offers them for storage only when shaderStorageImageExtendedFormats is set. SPIR-V draws the same line at the same place, which is what RequiresExtendedFormats records: their ImageFormat enumerants require the StorageImageExtendedFormats capability and the other thirteen require only Shader.
It is not pedantry, because the three are reachable. Vixen.Editor.TextureGraph's TextureFormats.RavenName spells R16Float as r16f and rewrites a kernel's [Format("…")] to it, and R16Float is the recommended format for a height field. No committed .rvn names one of the three — Ripples.rvn says in so many words that it takes rgba16f over rg16f for exactly this reason — so the whole exposure is through kernels built at run time, which no shader gate compiles.
Fields and properties (1)
public static string NamesThe recognised format names, in the order a diagnostic should list them.
Methods (2)
public static ImageFormat? Lookup(string? name)The format a [Format("…")] string names, or null.
public static PrimitiveTypeSymbol ElementType(ImageFormat format)The element type a format's images are read and written as: the four-lane vector of its component class.
Used by (5)
- IrCapabilitiesVixen.Raven
- SourceFieldSymbolVixen.Raven
- SourceNamedTypeSymbolVixen.Raven
- SpirvTypesVixen.Raven
- StorageImageTestsVixen.Raven.Tests