Shrinking Old Game Texture Sizes by 10%, at ~60GB/s
On a single core, and a 4 year old machine...
Without a loss in quality.
Part 1 of Texture Compression in Nx2.0
.
So I'm in the process of building an archive format (👈 WIP) suitable for game modding as part of the Reloaded3 project.
I aim for the following primary use cases:
- Read Only FileSystem: Something suitable in a reloaded redirector / usvfs style project.
- Hooking NT / POSIX API calls to trick processes into reading files from another place.
- Except we're reading from an archive.
- If we load/decompress on all threads, we load data faster, using less disk space.
- File Downloads: Mods need fast file downloads.
- Support streaming/partial download of archive contents.
- Minimize file size.
- User downloads less, mod site needs less traffic.
- Everyone is happy.
- As a game archive format: Replace old games' native archives with the new format.
- Through hooking, we can replace a native archive format with our own.
- For size, performance, and just because you can.
- Medium Term Archival: I want to save some mods on disk for future use.
- Basically as a general purpose archive format.
- For non-Reloaded3 software, to archive currently disabled mods to save disk space.
- The archive format extracts data so fast, extraction is as fast as your storage drive.
- So like 8GiB/s on a modern NVMe.
The last one, mainly to seek adoption.
Today, we're going to be unraveling one of the tricks to achieve one of these goals; faster texture loads and smaller sizes via texture transformation.
I'll speedrun you through the basics of the simplest (BC1 / DXT1) transform, and how you can write similar transforms to improve compression ratios of known data.
I'll keep it simple, no prior compression theory/experience required.
As an appetizer, quick demo follows below.