Textures & lighting

Material Channel Packing & VRAM Planner

Direct answer

Channel packing saves memory only when the packed format costs less than the separate masks it replaces. Six 2048² BC4 masks with mipmaps use 16 MiB per material; packing them into two BC7 textures uses 10.67 MiB, saving 33.3%. Packing four R8 masks into RGBA8 would use the same memory.

px

Result

Memory change from packing
Packed textures required
Unused channels in final packed texture
Separate masks per material
MiB
Packed textures per material
MiB
Separate masks across all materials
MiB
Packed textures across all materials
MiB

Method & assumptions

How this is worked out

Texture memory is width x height x bits per pixel / 8. A full mip chain multiplies the top level by approximately four thirds.

Separate storage multiplies one grayscale texture by mask count. Packed storage rounds mask count up by usable channels, then multiplies by the chosen packed format. Unused channels remain allocated because block compression stores the whole texture format.

This is GPU texture memory, not disk size. It does not include asset headers, virtual-texture page tables, streaming residency, sampler cost or shader instruction changes.

Typical mask storage choices

FormatBits / pixelPlanning use
BC44One high-quality grayscale mask
R88One uncompressed grayscale channel
BC14Three-channel packed mask without alpha
BC78High-quality RGB or RGBA packed masks
RGBA832Uncompressed four-channel data

Compression quality depends on whether channels contain unrelated high-frequency data. Inspect artefacts as well as memory before standardising a packing layout.

Questions

Does channel packing always save VRAM?

No. Four R8 masks total 32 bits per pixel, exactly the same as one RGBA8 texture. Savings come from the relationship between separate and packed compression formats, plus whether all packed channels are actually used.

What is an ORM texture?

It commonly packs ambient occlusion, roughness and metallic masks into the red, green and blue channels of one texture. The exact channel order is a project convention, so document it clearly.

Why can packed masks show compression artefacts?

Block compression optimises several channels together. Unrelated, sharp mask patterns can compete inside the same block. BC7 usually preserves packed data better than older colour formats, but the result should still be inspected.

Sources and assumptions

Sources define the engine settings or mathematical model. Project-specific performance and final playability still need measurement in the target build.