Games for Windows and the DirectX SDK blog

Technical tips, tricks, and news about game development for Microsoft platforms including desktop, Xbox, and UWP

Project maintained by walbourn Hosted on GitHub Pages — Theme by mattgraham
Home | Posts by Tag | Posts by Month

DirectXTex and Effects 11 Update

codeplex, direct3d, directcompute

Originally posted to Chuck Walbourn's Blog on MSDN,


It has been a busy summer which has resulted in “version 1.2” of the DirectXTex texture processing library. The focus of this release has been on improving Block Compression support. The biggest new feature is the integration of the DirectCompute 4.0 accelerated BC6H / BC7 texture compression codecs from the BC6HBC7EncoderCS sample. The latest texconv command-line tool will attempt to use the DirectCompute version when compressing for BC6H / BC7 when running on a system with a DirectCompute 4.0 capable hardware device (aka a Feature Level 10.0 or 10.1 video card with the optional DirectCompute feature or a Feature Level 11.x video card). This is a huge increase in performance compared to the original D3DX11 BC6H / BC7 software codecs.

For example, on my primary development system a 8K by 4K texture with mips took 25 minutes to compress using the multithreaded version of the D3DX11 BC6H / BC7 software codec across six hyper threaded CPU cores, which only took about 2.5 minutes using DirectCompute 4.0. I gave up on timing the single-threaded D3DX11 BC6H / BC7 software codec after an hour.

2.5 minutes is still a significant compress time for a single texture so future work here will focus on implementing a new faster algorithm using DirectCompute 5.0.

The latest release is available on CodePlex and GitHub. The documentation on Codeplex has also been updated.

August 13, 2013

  • DirectCompute 4.0 BC6H/BC7 compressor integration
  • texconv utility uses DirectCompute compression by default for BC6H/BC7, ``-nogpu`` disables use of DirectCompute

August 1, 2013

  • Support for BC compression/decompression of non-power-of-2 mipmapped textures
  • Fixes for BC6H / BC7 codecs to better match published standard
  • Fix for BC4 / BC5 codecs when compressing RGB images
  • Minor fix for the BC1-3 codec
  • New optional flags for ComputeMSE to compare UNORM vs. SNORM images
  • New WIC loading flag added to control use of WIC metadata to return sRGB vs. non-sRGB formats
  • Code cleanup and /analyze fixes
  • Project file cleanup
  • Texconv utility uses parallel BC compression by default for BC6H/BC7, ``-singleproc`` disables multithreaded behavior

July 1, 2013

  • VS 2013 Preview projects added
  • SaveToWIC functions updated with new optional setCustomProps parameter

Related: DirectXTex Update (June 2013), DirectXTex (October 2011)


In other news, the Effects 11 library now has a home on CodePlexGitHub. Be sure to read my original Effects for Direct3D 11 Update post for details on this library.

July 16, 2013 (11.07)

  • Added VS 2013 Preview project files
  • Cleaned up project files
  • Fixed a number of /analyze issues

June 13, 2013 (11.06)

  • Added GetMatrixPointerArray, GetMatrixTransposePointerArray, SetMatrixPointerArray, SetMatrixTransposePointerArray methods
  • Reverted back to BOOL in some cases because sizeof(bool)==1, sizeof(BOOL)==4
  • Some code-cleanup: minor SAL fix, removed bad assert, and added use of override keyword

February 22, 2013 (11.05)

  • Cleaned up some warning level 4 warnings

November 6, 2012 (11.04)

  • Added IUnknown as a base class for all Effects 11 interfaces to simplify use in managed interop scenarios, although the lifetime for these objects is still based on the lifetime of the parent ID3DX11Effect object. Therefore reference counting is ignored for these interfaces.
    • ID3DX11EffectType, ID3DX11EffectVariable and derived classes, ID3DX11EffectPass, ID3DX11EffectTechnique, and ID3DX11EffectGroup