The Effects 11 library (FX11) was made available as shared-source in the DirectX SDK. Previous versions of the Effects library were part of D3DX (FX9) or built into the OS (FX10). With the DirectX SDK now legacy (see Where is the DirectX SDK? and Where is the DirectX SDK (2013 Edition)?), there are still a number of people looking for the latest version since it is not included in the Windows 8.0 SDK. This post provides an updated version of the Effects 11 (FX11) library. The primary purpose of this release is to remove the dependencies on the legacy DirectX SDK for the D3DX11 headers, but it also includes some code tidying and a few customer requests.
If you still need Visual Studio 2008 support, you should keep using the legacy DirectX SDK (June 2010) version.
Effects 11 is primarily being provided as a porting aid for older code that make use of the Effects 10 (FX10) API or Effects 9 (FX9) API in the deprecated
D3DX9 library. See MSDN for a list of differences compared to the Effects 10 (FX10) library.
- The Effects 11 library is for use in Win32 desktop applications. FX11 requires the D3DCompiler API be available at runtime to provide shader reflection functionality, and this API is not deployable for Windows Store apps on Windows 8 or Windows RT.
fx_5_0profile support in the HLSL compiler is deprecated, and does not fully support DirectX 11.1 HLSL features such as minimum precision types. It is supported in the Windows 8.0 SDK version of the HLSL compiler (
FXC.EXE) and D3DCompile API (#46), but could be removed in a future update.
- The Visual Studio 2012 graphics diagnostics feature has had some problems when trying to debug
fx_5_0profile shaders. You may want to try the latest VS 2012 Update.
Here's a handy table of equivalents related to Effects (see Living without D3DX for a complete listing):
||Effects 11 does not support 'effect pools'
October 24, 2012 (11.03)
- Removed the dependency on the D3DX11 headers, so FX11 no longer requires the legacy DirectX SDK to build. It does require the d3dcompiler.h header from either the Windows 8.0 SDK or from the legacy DirectX SDK
- Removed references to D3D10 constants and interfaces
- Deleted the d3dx11dbg.cpp and d3dx11dbg.h files
- Deleted the D3DX11_EFFECT_PASS flags which were never implemented
- General C++ code cleanups (nullptr, C++ style casting, stdint.h types, Safer CRT, etc.) which are compatible with Visual C++ 2010 and 2012
- SAL2 annotation and /analyze cleanup
- Added population of Direct3D debug names for object naming support in PIX and the SDK debug layer; added additional optional parameter to D3DX11CreateEffectFromMemory to provide a debug name
- Added D3DX11CreateEffectFromFile, D3DX11CompileEffectFromMemory, and D3DX11CompileEffectFromFile
June 2010 (11.02)
- The DirectX SDK (June 2010) included an update with some minor additional bug fixes. This also included the Effects 11-based sample DynamicShaderLinkageFX11. This is the last version to support Visual Studio 2008. The source code is located in
February 2010 (11.01)
- An update was shipped with the DirectX SDK (February 2010). This fixed a problem with the library which prevented it from working correctly on 9.x and 10.x feature levels. This is the last version to support Visual Studio 2005. The source code is located in
August 2009 (11.00)
- The initial release of Effects 11 (FX11) was in DirectX SDK (August 2009). The source code is located in
Utilities\Source\Effects11. This is essentially the Effects 10 (FX10) system ported to Direct3D 11.0 with support for effects pools removed and support for groups added.
Samples: Effects 11 Win32 Samples on GitHub: Direct3D11TutorialsFX11, BasicHLSLFX11, DynamicShaderLinkageFX11, FixedFuncEmuFX11, and InstancingFX11.
Related: DirectXTex and Effects 11 Update