Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
DirectXTex, a shared source library for reading and writing
.DDS files, and performing various texture content processing operations including resizing, format conversion, mip-map generation, block compression for Direct3D runtime texture resources, and height-map to normal-map conversion. This library makes use of the Windows Image Component (WIC) APIs. It also includes simple
.HDR readers and writers since these image file format are commonly used for texture content processing pipelines, but are not currently supported by a built-in WIC codec.
See this blog post for an overview.
DirectXTex was formerly hosted on CodePlex.
Porting from D3DX
See this post for a complete listing of D3DX equivalents.
DirectXTex vs. DirectX Tool Kit
The DirectXTex library is designed a full-featured texture processing library that includes a sophisticated DDS file reader. This reader can handle numerous legacy formats and automatically performs required conversions. This makes it extremely useful in tools and content pipelines, but is far more code that is really needed for a game or application at runtime that loads 'cooked' textures.
Instead, a game or application should make use of DDSTextureLoader (DX11 or DX12) and/or WICTextureLoader (DX11 or DX12). These modules provide light-weight versions of texture creation from
.tif, and JPEG-XR / HD Photo files. ScreenGrab (DX11 or DX12)is a light-weight screenshot capture utility for writing out the same file types.
Xbox One XDK
The xtexconv sample also includes some auxiliary platform-specific functionality for Xbox One XDK development on the Microsoft Game Developer Network (access required). This includes functions for tiling & de-tiling textures, and a variant
.DDS file reader/writer for storing tiled textures. The DirectX Tool Kit includes the XboxDDSTextureLoader for using placement texture creation using this DDS file variant.
Windows SDK Sample
There is another version of the DirectXTex library and the
texconv utility as an official Microsoft Windows SDK Sample on MSDN Code Gallery. It is functionality similar to the June 2013 release.
The various video independent hardware vendors (IHVs) have their own texture toolsets as well.
Note that the NVIDIA tools haven't been updated in some time, and are currently missing support for the DX10 header extension, BC6H, and BC7.
The DirectXTex library is the work of Chuck Walbourn, with contributions from Matt Lee, Xin Huang, Craig Peeper, and the numerous other Microsoft engineers who developed the D3DX utility library over the years.