The .drft container · const

CODEC_BC

Added in 1.24: block-compressed images, kept as the blocks they were authored in.

Explained in The .drft container.

const CODEC_BC = 5
import { CODEC_BC } from '@driftengine/drft';

In depth

Uploaded as they are where the device can sample them, so a texture authored as BC7 costs a byte a texel on the GPU rather than four, and the mip chain the author built rather than one the engine generates. Where the device cannot — most phones, which sample ASTC and ETC2 instead — the loader decodes them to RGBA, which is the cost every texture paid before this. The payload — block format, colour space and the stored mip chain — is drftBc.ts's.