Basis Universal GPU Texture Codec
Basis Universal™ v2.5 is an open source supercompressed LDR/HDR GPU compressed texture interchange system from Binomial LLC that supports two intermediate file formats: the .KTX2 open standard from the Khronos Group, our own ".basis" file format, and Microsoft's .DDS file format. These file formats support rapid transcoding to virtually any compressed GPU texture format released over the past quarter century.
Our overall goal is to simplify the encoding and efficient distribution of portable LDR and HDR GPU texture, image, and short animated texture content in a way that is compatible with any GPU, rendering/graphics API, or platform including plain WASM.
The system supports eight modes/codecs. In the order they were implemented:
Each codec supports on the fly transcoding to other GPU texture formats, either by directly converting from one GPU texture latent to another, or by using analytical real-time encoders. For example, XUBC7 can be transcoded to ASTC LDR 4x4, ETC1/2, PVRTC1, etc. XUASTC LDR (any block size) can be transcoded to BC1-7, ETC1/2, etc. Our HDR formats can be transcoded to BC6H (unsigned).
The C/C++ encoder and transcoder libraries can be compiled to native code or WebAssembly (web or WASI), and all encoder/transcoder features can be accessed from JavaScript via a C++ wrapper library which optionally supports WASM multithreading for fast encoding in the browser. WASM WASI builds, for the command line tool and the encoder/transcoder as a WASI module using a pure C API, are also supported.
Full Python support for encoding/transcoding is now available, supporting native or WASM modules, but is still in the early stages of development.
The reference encoder library, transcoder, and most specification documents in this repo (unless otherwise explictly indicated) are Copyright © 2016–2026 Binomial LLC. All rights reserved except as granted under the Apache 2.0 LICENSE. Basis Universal™ is a trademark of Binomial LLC. KTX™ is a trademark of The Khronos Group Inc. See our Apache 2.0 NOTICE file. If you modify the Basis Universal reference source code, specifications, or wiki documents and redistribute the files, you must cause any modified files to carry prominent notices stating that you changed the files (see Apache 2.0 §4(b)).
See our DEP5 file for the complete list of software and their licenses in this repo. The encoder library is Apache 2.0, but it utilizes some open source 3rd party modules (in 'encoder/3rdparty' and in the 'Zstd' directory) to load .QOI, .DDS, .EXR images, to handle Zstd compression, and to unpack ASTC texture blocks. See the LICENSES folder. The transcoder utilizes no 3rd party libraries or dependencies, other than Zstd (which is optional but limits the transcoder to non-Zstd utilizing codecs).
ETC1S, UASTC LDR 4x4, XUASTC LDR 4x4-12x12 and ASTC LDR 4x4-12x12 files can be transcoded to:
UASTC HDR 4x4, ASTC HDR 6x6, and UASTC HDR 6x6 files can be transcoded to:
The transcoder module (in v2.5) now fully supports reading and transcoding LDR .DDS files in a variety of formats (BC1-7 and numerous 1/2/3/4 channel uncompressed formats). It supports DX9 and DX10 format files, cubemaps, texture arrays, mipmaps, etc. The .DDS transcoder supports near-lossless transcoding to ASTC LDR 4x4, and real-time encoding to ETC1/2, PVRTC1, etc. This new feature for v2.5 permits standard .DDS files to be easily deployed to any GPU device/API/etc. The encoder library, command line tool, and UI tool can also create .DDS files in a variety of formats, and for development/testing .KTX2 files can be exported to .DDS files.
ETC1S: A roughly .3-3bpp low to medium quality supercompressed mode based on a subset of ETC1 called "ETC1S". This mode supports variable quality vs. file size levels (like JPEG), alpha channels, built-in compression, and texture arrays optionally compressed as a video sequence using skip blocks (Conditional Replenishment). This mode can be rapidly transcoded to all of the supported LDR texture formats.
UASTC LDR 4x4: An 8 bits/pixel LDR high quality mode. UASTC LDR is a 19 mode subset of the standard ASTC LDR 4x4 (8bpp) texture format, but with a custom block format containing transcoding hints. Transcoding UASTC LDR to ASTC LDR and BC7 is particularly fast and simple, because UASTC LDR is a common subset of both BC7 and ASTC. The transcoders for the other texture formats are accelerated by several format-specific hint bits present in each UASTC LDR block.
This mode supports an optional Rate-Distortion Optimized (RDO) post-process stage that conditions the encoded UASTC LDR texture data in the .KTX2/.basis file so it can be more effectively LZ compressed. More details here.
Here is the UASTC LDR 4x4 specification document.
No open issues yet, or sync has not completed.