The original Effects 11 library is documented on MSDN.
API Differences from the original Effects 11
- SetBool, GetBool, SetBoolArray, SetBoolArray, SetBoolVector, GetBoolVector, SetBoolVectorArray, and GetBoolVectorArray use the C++
bool type rather than the Windows BOOL type. Note sizeof(bool) == 1 and sizeof(BOOL) == 4.
- ID3DX11EffectMatrixVariable includes some additional methods: SetMatrixPointerArray, GetMatrixPointerArray, SetMatrixTransposePointerArray, and GetMatrixTransposePointerArray
- D3DX11CreateEffectFromFile loads a binary shader blob and create an effect instance from it. This is the 'disk' version of the original
- D3DX11CompileEffectFromMemory will compile text-based FX shader source in memory using the D3DCompile APIs and then create an effect instance
- D3DX11CompileEffectFromFile will compile a text-based FX shader file using the D3DCompile APIs and then create an effect instance from it.
- The following types are now derived from IUnknown: ID3DX11EffectType, ID3DX11EffectVariable, ID3DX11EffectPass, ID3DX11EffectTechnique, ID3DX11EffectGroup. Note that these objects do not follow standard COM reference-counting rules and they are released
when the parent ID3DX11Effect is released. This is mostly to simplify use of Effects 11 from managed languages.
- The #define D3DX11_EFFECTS_VERSION indicates the release version as a decimal number.
This code is designed to build with Visual Studio 2013, Visual Studio 2012, or Visual Studio 2010. It requires d3dcompiler.h and other Direct3D 11 headers from either the Windows 8.x SDK or the legacy DirectX SDK. Visual Studio 2013 includes the Windows 8.1
SDK and Visual Studio 2012 includes the Windows 8.0 SDK. Visual Studio 2010 users must install the standalone Windows 8.x SDK. Details on using the Windows 8.x SDK with VS 2010 are described on the Visual C++ Team Blog.
This library has been updated to work without requiring any content from the DirectX SDK. For details, see "Where is the DirectX SDK"? and "Where is the DirectX SDK (2013 Edition)?"
Adding to a VS solution
Using project-to-project references
In your application's solution, right-click on the Solution and use "Add \ Existing Project..." to add the appropriate .vcxproj file to your solution.
- Effects11_2013 is for Win32 desktop applications building with VS 2013 Express for Desktop, VS 2013 Community, VS 2013 Professional or higher.
- Effects11_2012 is for Win32 desktop applications building with VS 2012 Express for Desktop, VS 2012 Professional or higher
- Effects11_2010_SDK81 is for Win32 desktop applications building with VS 2010 using the Windows 8.1 SDK
- Effects11_2010_DXSDK is for Win32 desktop applications building with VS 2010 using an older Windows SDK and the legacy DirectX SDK (June 2010).
In your application's project, right-click on the Project and use "References...", then "Add New Reference...", and then check the Effects11 project name and click OK.
In your application's project settings, on the "C++ / General" page set Configuration to "All Configurations", set Platform to "All Platforms", and then add the relative path to
--assuming you have the Effects11 folder in the same directory as your sln file, it should be
--to the Additional Include Directories
properties. Click Apply.
When using VS 2010 with the Windows 8.0 or Windows 8.1 SDK, or when using VS 2012 with the Windows 8.1 SDK, you'll need to apply the correct .props files to your projects as well as use the correct Effects 11 project.
Using NuGet package manager
Alternatively you can use NuGet to install the Effects 11 package. Use Project / Manage NuGet Packages...
then select "Online" and search for "Effects 11".
- Use Id: fx11_desktop_2013 for Win32 desktop C++ applications building with the VS 2013 Express for Desktop, VS 2013 Community, VS 2013 Professional or higher
You should use the NuGet interface to check for updates if you have an older version installed.
The Effects 11 library requires the D3DCompile DLL to be present at runtime, and the EXE project must link to d3dcompiler.lib.
- When using the Windows 8.1 SDK and targeting only Windows 8.1, you can rely on the D3DCompile_47.DLL to be present on the system as part of the OS image. Note that support for the fx_5_0 profile is deprecated with the #47 compiler.
- When using the Windows 8.x SDK and targeting Windows Vista or later, you can include the D3DCompile_46 or D3DCompile_47 DLL side-by-side with your application copying the file from the REDIST folder. Note that support for the fx_5_0 profile is deprecated
with the #47 compiler.
%ProgramFiles(x86)%\Windows kits\8.0\Redist\D3D\arm, x86 or x64
%ProgramFiles(x86)%\Windows kits\8.1\Redist\D3D\arm, x86 or x64