What’s texture compression?

Print anything with Printful



Texture compression reduces memory usage for image textures used in 3D graphics. It allows access to specific pixels without decompressing the entire image. Block truncation encoding is a basic method of compression. Compression can occur at runtime or be saved as a file.

Related to computer graphics, texture compression is a way of capturing an image that will be used as a texture on an object, usually in a three-dimensional (3D) scene, and reducing the amount of memory the image requires. Unlike more traditional image compression algorithms, texture compression methods attempt to provide a way to keep the image compressed in memory while also allowing a program to access specific pixels within the image without having to fully decompress the image. There are several ways to achieve this, including truncated block (BTC) coding, although saving memory space during program execution usually needs to be balanced against either increased processor usage or decreased image quality. image resulting from the use of lossy compression. More frequently, manufacturers of different graphics cards and other devices implement texture compression support directly in hardware, leading to several common compression algorithms that bear the names of different hardware manufacturers.

One reason why texture compression has been developed and has become a common technique in 3D graphics is that several tens of gigabytes of memory can be required to store uncompressed image textures for scenes intended to be viewed on higher resolution monitors. elevated. Also, portable digital devices generally have limited amounts of memory that would otherwise not be able to hold the images required for a 3D scene. Texture compression reduces the amount of memory needed on a system so that more textures or higher quality textures can be used.

The most basic type of texture compression is known as block truncation encoding. This method takes an image and divides it into small blocks of pixels, finding the two colors within the block that are furthest apart from a color space perspective. The actual image pixels within the block are then assigned a numerical value to indicate their color in relation to the two extreme colors. The scheme compresses an image because the amount of bits required to store a pixel’s deviation from colors in a block is less than that required to store the actual color. The resulting compression also provides a way to index pixels directly from the compressed image as needed.

Depending on hardware, software, and other factors, texture compression may occur at runtime or it may be done in advance and saved as a file. Dynamically created textures must always be compressed during execution. Loading a compressed texture from a file can be faster initially, but can also cause problems if your hardware doesn’t support a specific type of compression.




Protect your devices with Threat Protection by NordVPN


Skip to content