This project is now hosted on GitHub
. This site is being maintained for now, but please move to using GitHub
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 2012 or later. It requires d3dcompiler.h and other Direct3D 11 headers from the Windows 8.x SDK. Visual Studio 2012 or later includes the Windows 8.x SDK.
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_2015 is for Windows desktop applications building with VS 2015.
- Effects11_2013 is for Windows desktop applications building with VS 2013 Express for Desktop, VS 2013 Community, VS 2013 Professional or higher.
- Effects11_2012 is for Windows desktop applications building with VS 2012 Express for Desktop, VS 2012 Professional or higher
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.
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 Windows 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.DLL 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