Skip to content
Chuck Walbourn edited this page May 15, 2024 · 75 revisions

http://go.microsoft.com/fwlink/?LinkId=248926

OpenSSF Best Practices

GitHub All Releases GitHub Release Date

Nuget UWP Nuget Win32 Nuget Win10 Nuget VS 2017

GitHub last commit Code size

Azure DevOps VS 2019 Azure DevOps VS 2022

Azure DevOps GDK Azure DevOps GDK

Azure DevOps GDK Xbox Exts Azure DevOps GDK Xbox Exts

Azure DevOps CMake Azure DevOps CMake Latest

Azure DevOps WSL 9 Azure DevOps WSL 11 Azure DevOps MinGW

Azure DevOps test suite build Azure DevOps test suite build

DirectX Logo 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 .TGA and .HDR readers and writers since these image file format are commonly used for texture content processing pipelines, but are not supported by a built-in WIC codec.

See this blog post for an overview.

DirectXTex library

Texconv utility

Texassemble utility

Texdiag utility

DDSView sample

Image formats

Resources

NuGet

DirectXTex is also available from the NuGet Gallery:

vcpkg C++ Package Manager

DirectXTex has a vcpkg installation port as well.

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 (DX9 / DX11 / DX12) and/or WICTextureLoader (DX9 / DX11 / DX12). These modules provide light-weight versions of texture creation from .dds, .bmp, .png, .gif, .jpg, .tif, and JPEG-XR / HD Photo files. ScreenGrab (DX9 / DX11 / DX12) is a light-weight screenshot capture utility for writing out the same file types.

These modules are included in DirectX Tool Kit (DX11 and DX12), and there are 'standalone' versions available in the DirectXTex distribution as well.

See Direct3D 11 Textures and Block Compression

Xbox

The xtexconv sample also includes some auxiliary platform-specific functionality for Xbox One XDK / Microsoft GDKX development, which are in the Auxiliary folder. 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 DX11 / DX12 for using placement texture creation using this DDS file variant.

IHV compressors

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.

Support

For questions, consider using Stack Overflow with the directxtk tag, or the DirectX Discord Server in the dx12-developers or dx9-dx11-developers channel.

For bug reports and feature requests, please use GitHub issues for this project.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

Tests for new features should also be submitted as a PR to the Test Suite repository.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Credits

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.

Thanks to Paul Penson for his help with the implementation of MemoryStreamOnBlob.

Thanks to Andrew Farrier and Scott Matloff for their on-going help with code reviews.

Thanks to Park DongHa for their contribution of the JPEG/PNG auxiliary functions.