We are independent & ad-supported. We may earn a commission for purchases made through our links.
Advertiser Disclosure
Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.
How We Make Money
We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently of our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.
Software

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

What Is Texture Compression?

By Eugene P.
Updated: May 16, 2024
Views: 4,431
References
Share

In relation to computer graphics, texture compression is a way to take an image that will be used as a texture on an object, usually in a three-dimensional (3D) scene, and reduce the amount of memory the image requires. Unlike more traditional image compression algorithms, texture compression methods attempt to provide a way to keep the compressed image in memory while also allowing a program to access specific pixels within the image without having to completely decompress the image. There are several ways this is achieved, including block truncation coding (BTC), although the savings in memory space during program execution usually must be balanced against an increase in processor usage or a reduction in image quality resulting from the use of lossy compression. Most frequently, the manufacturers of different graphics cards and other devices implement support for texture compression directly into the hardware, leading to several common compression algorithms bearing the names of different hardware manufacturers.

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

The most basic type of texture compression is known as block truncation coding. This method takes an image and divides it into small blocks of pixels, finding the two colors within the block that are the farthest 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 the colors in a block are less than what is 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 the hardware, software and other factors, texture compression can occur at runtime or can be performed beforehand and saved as a file. Dynamically created textures always must be compressed during execution. Loading a compressed texture from a file can be faster initially, but it also can cause problems if the hardware does not support a specific type of compression.

Share
EasyTechJunkie is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.
Link to Sources
Discussion Comments
Share
https://www.easytechjunkie.com/what-is-texture-compression.htm
Copy this link
EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.

EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.