Vixen
02b45cc4
csharp
public static class DataFormatDescriptor

The Khronos data format descriptor a KTX2 file carries.

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

Remarks

A KTX2 file says what its bytes are twice: once as a VkFormat number in the header, and once as a descriptor that spells out the channels, their bit positions and the transfer function. The second exists so a reader that has never heard of the number can still work out what it is holding, and the specification requires it even when the number says everything.

This writes the basic block — colour model, primaries, transfer function, texel block dimensions, plane sizes and one sample per channel — which is what the format calls for and no more. It does not attempt the descriptor's fuller vocabulary, because nothing in this engine reads it: the VkFormat number is what Read uses, and the descriptor is written for other people's tools.

Fields and properties (2)

  • public const int BasicBlockLength

    How long a descriptor block's fixed part is, before its samples.

  • public const int SampleLength

    How long one sample is.

Methods (1)

  • public static byte[] Build(PixelFormat format)

    Builds the descriptor for a format.

Used by (1)

  • Ktx2Vixen.Core.Imaging