Skip to main content
Deep DiveTexture CompressionExplainer· 6 min read· in Technology

The 128-Bit Constraint: How BC7 Texture Compression Partitions the 4x4 Pixel Block

By doubling the block size to 128 bits and introducing 64 partition shapes, BC7 allows graphics hardware to interpolate multiple color lines within a single 16-pixel grid. The format trades an exponential increase in encoding time for bit-exact, fixed-cost hardware decoding.

By Elena Castillo

Compression Engineers 40%Hardware Architects 35%Technical Artists 25%
Compression Engineers
Focuses on the algorithmic challenge of navigating BC7's massive search space during encoding.
Hardware Architects
Focuses on the necessity of fixed-cost memory access and bit-exact silicon implementation.
Technical Artists
Focuses on the visual fidelity and the elimination of manual channel-packing workarounds.

Perspectives this story doesn't cover

  • Mobile GPU Developers
  • Neural Compression Researchers

Summary

  • BC7 compresses a 4x4 block of 16 pixels into exactly 128 bits, achieving a 4:1 compression ratio.
  • The format uses 64 predefined partition shapes to allow up to three independent color lines per block.
  • Eight distinct structural modes allow the encoder to trade off endpoint precision against index precision.
  • Hardware decoding is bit-exact and executes in O(1) time, ensuring consistent cross-vendor rendering.
  • Encoding requires heuristic algorithms to navigate the massive search space, making compression computationally expensive.

A single 4x4 block of pixels in a modern video game texture consumes exactly 128 bits of memory when encoded using the BC7 compression format. That 16-byte footprint, standardized by Microsoft in the DirectX 11 specification, represents a hard physical limit. Within those 128 bits, the graphics processing unit must extract enough color and alpha information to paint 16 individual pixels on a screen without introducing the banding and blockiness that plagued earlier compression methods. The mechanism that makes this possible is not a brute-force increase in resolution, but a structural shift in how the color space itself is partitioned and interpolated.[1]

The fundamental math of texture memory is unforgiving. Uncompressed 8-bit RGBA data requires 32 bits per pixel. A 4x4 grid of 16 pixels totals 512 bits. BC7 forces this into 128 bits, achieving a 4:1 compression ratio. While that ratio is impressive, it is actually less aggressive than the formats that preceded it. In 1999, S3 Graphics introduced S3TC (later adopted as DXTC or BC1), which squeezed that same 4x4 block into just 64 bits. BC1 was revolutionary for its time, but its 8:1 compression ratio was visually destructive when applied to complex images.[4][5]

BC7 reduces a standard 512-bit block of uncompressed pixels down to a fixed 128-bit footprint.

The core mechanism of all block compression is the "color line." As graphics programmer Nathan Reed noted in his 2012 analysis of the formats, the algorithm defines two endpoint colors in a 3D RGB space and interpolates a straight line between them. Every pixel in the 4x4 block is then assigned a 2-bit or 3-bit index, snapping its color to the nearest point on that single line. This works perfectly for a smooth gradient of blue sky, where all the local colors naturally fall along a single trajectory.[4]

But the single-line assumption breaks down immediately when a block contains high-frequency detail. "Most of the BCn formats will give poor-quality results anywhere that three very different colors are present in a single block," Reed wrote. Red, green, and blue pixels cannot physically sit on the same straight line in 3D space. When forced onto one line, the resulting image exhibits the blocky, banded artifacts that defined early 3D gaming.[4]

Microsoft and the Khronos Group designed BC7—also known as BPTC in the OpenGL specification—specifically to solve this geometric limitation without abandoning the 4x4 block structure. The solution was partitioning. Instead of forcing all 16 pixels to share one pair of endpoints, BC7 allows the block to be split into two or three separate subsets.[1][2]

Each subset gets its own independent color line. A single 4x4 block can now accurately represent a sharp edge where a red brick meets a green leaf and a blue sky, because each region is interpolated separately. However, storing a custom pixel map to define these subsets would consume too many bits. Instead, the BC7 specification includes a hardcoded table of 64 predefined partition shapes. The encoder simply stores a 6-bit ID to select the shape that best matches the image data.[3][5]

Instead of forcing all 16 pixels onto one color line, BC7 uses a table of 64 predefined partition shapes to apply multiple color lines per block.

This flexibility introduces a structural problem: a 128-bit block is too small to simultaneously hold three pairs of high-precision endpoints, 16 pixel indices, and the partition ID. The format had to become polymorphic. BC7 solves this by defining eight distinct modes, numbered Mode 0 through Mode 7. The mode is declared in the least significant bits of the block using a unary code—a sequence of zeroes terminated by a one.[1][3]

BC7 solves this by defining eight distinct modes, numbered Mode 0 through Mode 7.

Because the mode dictates the layout of the remaining bits, each block can trade off features based on its specific needs. Mode 0, for example, supports three subsets but limits the endpoints to 4-bit precision. Mode 6 supports only one subset but offers 7-bit endpoint precision and 4-bit indices, making it ideal for smooth, complex gradients where banding would otherwise be visible.[3]

The format also employs aggressive bit-level optimization to maximize precision. One technique is the "P-bit" or pseudo-bit. Rather than spending three bits to increase the precision of the Red, Green, and Blue channels individually, BC7 shares a single least-significant bit across all three channels of an endpoint, effectively doubling the precision grid without wasting bandwidth.[1][4]

Another optimization is degeneracy breaking. Because swapping the two endpoints of a color line simply inverts the indices along it, the encoder can guarantee that the first index in any subset always starts with a zero. By making that zero implicit, BC7 discards it entirely, saving exactly one bit per subset. This trick allows the format to store 64 bits of index data in a 63-bit space.[1][4]

Block compression approximates local pixel colors by projecting them onto a straight line between two endpoints in RGB space.

Alpha transparency is similarly dynamic. Older formats like BC3 appended a separate 64-bit block purely for alpha data, treating it as a completely separate image. BC7 interleaves alpha directly into the 128-bit payload, allocating bits dynamically based on whether the transparency correlates with the color channels. If the alpha channel is highly correlated with the RGB data, the encoder can use a single set of indices for both, freeing up bits for higher endpoint precision.[2][5]

The marketing surrounding BC7 often describes it as delivering "high-quality" or "near-lossless" textures. This framing obscures the reality of how the format actually operates: it is a heavily quantized, lossy approximation. The visual fidelity does not come from preserving the original data, but from a massive expansion of the encoding search space. With eight modes, 64 partitions, and varying endpoint combinations, a compressor must evaluate thousands of permutations for every 16 pixels.[5][6]

Exhaustively testing every combination is computationally impossible for a modern game containing gigabytes of textures. Encoders rely on simulated annealing and gradient descent heuristics to guess the least-bad option. This creates a severe asymmetry. Encoding a texture into BC7 can take hours on a multi-core CPU, shifting the entire computational burden onto the developer's build pipeline.[4][6]

In exchange, the decoding process is instantaneous. The graphics hardware features dedicated silicon that reads the 128-bit block, checks the mode bits, and executes a fixed-cost decompression in nanoseconds. Furthermore, the Khronos Group specification mandates that BC7 decompression hardware must be bit-accurate. An image compressed on an Intel processor will decode to the exact same pixel values on an AMD or NVIDIA GPU.[1][2]

The first bits of a BC7 block dictate which of the eight structural modes the decoder must use to parse the remaining data.

This strict standardization prevents the subtle visual discrepancies that plagued earlier, loosely defined formats where different vendors implemented slightly different interpolation math. By locking down the exact output of the decoder, BC7 ensures that the artistic intent is preserved across all compliant hardware.[2][4]

BC7 represents the physical limit of what can be achieved within a 128-bit constraint. It does not magically create bandwidth; it provides a highly flexible vocabulary for describing local color variations, trading an exponential increase in encoding time for a linear increase in rendering fidelity. The next frontier in texture compression will not come from packing more data into 16 bytes, but from architectures that bypass the 4x4 block entirely.[6]

Definitions

Block Compression (BCn)
A family of lossy texture compression formats that divide an image into fixed-size grids, typically 4x4 pixels, to guarantee constant-time memory access.
Endpoint
A specific color value in 3D RGB space used as an anchor; other colors in the block are calculated by interpolating between two endpoints.
Partition
A predefined shape that divides the 16 pixels of a 4x4 block into two or three distinct subsets, allowing each subset to use its own pair of endpoints.
Degeneracy Breaking
An optimization technique where swapping the order of two endpoints allows the encoder to omit one bit of index data, saving space.
P-bit (Pseudo-bit)
A shared least-significant bit applied simultaneously to the Red, Green, and Blue channels of an endpoint to increase precision without consuming three separate bits.

Questions & answers

Why not use standard image compression like JPEG or PNG?

Standard formats use variable-length compression, meaning the GPU would have to decompress the entire image just to read a single pixel. Block compression guarantees that every 4x4 grid is exactly 128 bits, allowing the hardware to fetch random pixels instantly.

How does BC7 differ from older formats like BC1?

BC1 uses 64 bits per block and forces all 16 pixels onto a single color line, which causes banding. BC7 uses 128 bits and allows up to three separate color lines per block via partitions, preserving sharp edges and complex gradients.

Why does compressing a texture into BC7 take so long?

Because BC7 has eight modes, 64 partition shapes, and varying endpoint precisions, the encoder must evaluate thousands of possible combinations for every 16 pixels to find the configuration that produces the least visual error.

Does BC7 support transparency?

Yes. Unlike older formats that appended a separate block for alpha data, BC7 interleaves alpha directly into the 128-bit payload, dynamically allocating bits based on whether the transparency correlates with the color channels.

Significance

Texture memory is the primary bottleneck in modern rendering. By fundamentally changing how color space is mapped rather than just increasing resolution, BC7 allows developers to ship photorealistic assets without exceeding the physical bandwidth limits of consumer graphics cards.

Sources

Source coverage

6 outlets

3 viewpoints surfaced

Compression Engineers 40%Hardware Architects 35%Technical Artists 25%
  1. [1]Microsoft LearnHardware Architects

    BC7 Format

    Read on Microsoft Learn
  2. [2]The Khronos GroupHardware Architects

    BPTC Texture Compression

    Read on The Khronos Group
  3. [3]Microsoft LearnHardware Architects

    BC7 Format Mode Reference

    Read on Microsoft Learn
  4. [4]ReedbetaCompression Engineers

    Understanding BCn Texture Compression Formats

    Read on Reedbeta
  5. [5]Conn BuraniczTechnical Artists

    Block Compression (BC1-BC7)

    Read on Conn Buranicz
  6. [6]Factlen Editorial TeamCompression Engineers

    Synthesis by Factlen editorial team

    Read on Factlen Editorial Team

Comments

Stay informed

Every angle. Every day.

Get Technology stories with full source coverage and perspective breakdowns delivered to your inbox.