The .drft container · type

BcFormat

The block formats a CODEC_BC payload may hold: what one 4x4 block of texels encodes.

Explained in The .drft container.

type BcFormat = 'bc1' | 'bc2' | 'bc3' | 'bc4' | 'bc5' | 'bc7'
import type { BcFormat } from '@driftengine/drft';

In depth

BC1 is colour with punch-through alpha in eight bytes; BC2 and BC3 colour with explicit and interpolated alpha in sixteen; BC4 one channel and BC5 two (a normal map) in eight and sixteen; BC7 colour and alpha in sixteen, with eight modes chosen per block. BC6H, signed BC4/BC5 and the other families are not among them: an HDR or signed texture is a different contract, refused by name rather than mis-decoded.