DirectXTex reads and writes DDS and other image formats and performs texture processing for Direct3D resources, including resizing, conversion, mips, and block compression.
Overview
DirectXTex is a shared-source C++ library focused on texture assets for Direct3D pipelines. It provides DDS read and write with legacy format support, plus TGA and HDR readers and writers where WIC does not cover those formats.
Processing capabilities include resizing, format conversion, mipmap generation, BC block compression for runtime textures, and height-map to normal-map conversion. A WIC-based path handles common bitmap formats such as BMP, JPEG, PNG, TIFF, and HD Photo for tool-oriented workflows.
The distribution also ships companion samples and loaders: command-line utilities such as texconv, texassemble, and texdiag; a DDS viewer; lightweight DDS, WIC, and screenshot helpers for Direct3D 9, 11, and 12; and optional auxiliary code for formats like OpenEXR or Xbox tiling. Public API surface is primarily DirectXTex.h and DirectXTex.inl.
The code is intended to build without the legacy DirectX SDK, using current Windows SDKs and modern Visual Studio or clang on Windows, with optional builds via Windows Subsystem for Linux. It is positioned as a replacement for many D3DX texture utilities when maintaining games or tools on Windows.
Key features
- DDS read and write with DXGI formats
- TGA and HDR file support
- WIC-based bitmap load and save
- Resize, convert, and generate mipmaps
- BC1–BC7 block compression
- Height map to normal map
- Companion texconv command-line tool
- Direct3D 9/11/12 loader modules
Use cases
- Game and graphics tool texture pipelines
- Converting assets for Direct3D runtimes
- Replacing legacy D3DX texture workflows
- Runtime DDS loading in DirectX applications