Compressing textures into the BC7 format
A major downside of high-resolution texture data is that it uses a lot of GPU memory for storage. To address this, all modern real-time rendering APIs offer texture compression, which lets us store textures in compressed formats on the GPU. One common format is BC7
, a standard texture compression format for Vulkan that is supported on many devices.
bc7enc
is an open-source library that can compress RGBA bitmaps into the BC7
format. In this recipe, you will learn how to integrate this library into your own applications to create tools for your custom graphics pre-processing pipelines.
The BC7
format is described in great detail in https://learn.microsoft.com/en-us/windows/win32/direct3d11/bc7-format and we will use it in our book to store textures for the large Lumberyard Bistro dataset.
Let’s learn how to compress 2D .jpg
or .png
images into BC7
.
Getting ready
The source code for this recipe is located at Chapter01...