-
Notifications
You must be signed in to change notification settings - Fork 139
Effects 11
The original Effects 11 library is documented on Microsoft Docs.
-
SetBool,GetBool,SetBoolArray,SetBoolArray,SetBoolVector,GetBoolVector,SetBoolVectorArray, andGetBoolVectorArrayuse the C++ bool type rather than the Windows BOOL type. Notesizeof(bool) == 1andsizeof(BOOL) == 4. -
ID3DX11EffectMatrixVariableincludes some additional methods:SetMatrixPointerArray,GetMatrixPointerArray,SetMatrixTransposePointerArray, andGetMatrixTransposePointerArray. -
D3DX11CreateEffectFromMemory takes an optional parameter which is used in the DEBUG version for 'debug object naming'.
-
D3DX11CreateEffectFromFile loads a binary shader blob and create an effect instance from it. This is the 'disk' version of the original
D3DX11CreateEffectFromMemoryfunction. -
D3DX11CompileEffectFromMemory will compile text-based FX shader source in memory using the D3DCompile APIs and then create an effect instance from it.
-
D3DX11CompileEffectFromFile will compile a text-based FX shader file using the D3DCompile APIs and then create an effect instance from it.
-
D3DX11DebugMute to control the output of diagnostic messages in Debug builds.
-
The following types are now derived from
IUnknown:ID3DX11EffectType,ID3DX11EffectVariable,I3DX11EffectPass,ID3DX11EffectTechnique,ID3DX11EffectGroup. Note that these objects do not follow standard COM reference-counting rules and they are released when the parentID3DX11Effectis released. This is mostly to simplify use of Effects 11 from managed languages. -
The
#define D3DX11_EFFECTS_VERSIONindicates the release version as a decimal number.
This code is designed to build with Visual Studio 2015 or later. It requires d3dcompiler.h and other Direct3D 11 headers from the Windows 8.1 SDK or Windows 10 SDK which is included with VS 2015 or later.
This library has been updated to work without requiring any content from the DirectX SDK. For details, see Where is the DirectX SDK?, Where is the DirectX SDK (2021 Edition)?, and The Zombie DirectX SDK.
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_2022_Win10 | Windows desktop applications for Windows 7 or later building with VS 2022 Community, Professional or higher with the latest Windows SDK. |
| Effects11_2019_Win10 | Windows desktop applications for Windows 7 or later building with VS 2019 Community, Professional or higher with latest Windows SDK. |
For VS 2019, use of the 16.11 is required as all previous versions are no longer supported.
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 Effects11\Inc;--assuming you have the Effects11 folder in the same directory as your sln file, it should be $(SolutionDir$)\Effects11\Inc;--to the Additional Include Directories properties. Click Apply.
See the Visual C++ Team Blog
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_2019 for Windows desktop C++ applications building with VS 2019 or VS 2022 Community/Professional or higher.
You should use the NuGet interface to check for updates if you have an older version installed.
These NuGet packages are no longer supported.
- Windows desktop app using VS 2017
- Windows desktop app using VS 2015
- Windows desktop app using VS 2013
Effects 11 is also available through the vcpkg C++ Library Manager.
vcpkg install effects11
For the 64-bit version of the library, use:
vcpkg install effects11:x64-windows
For the Universal Windows Platform (UWP) versions, use:
vcpkg install effects11:x64-uwp
arm,arm64,x86,x64,windows, anduwptriplets are supported.
The Effects 11 library requires the D3DCompile DLL to be present at runtime, and the EXE project must link to d3dcompiler.lib.
-
When targeting Windows 8.1 or later, you can rely on the
D3DCompile_47.DLLto be present on the system as part of the OS image. -
When using the Windows 8.1 SDK / Windows 10 SDK and targeting Windows Vista or later, you can include the
D3DCompile_47.DLLside-by-side with your application copying the file from the REDIST folder.%ProgramFiles(x86)%\Windows kits\8.1\Redist\D3D\arm, x86 or x64%ProgramFiles(x86)%\Windows kits\10\Redist\D3D\x86 or x64
Note that support for the fx_5_0 profile is deprecated with the #47 compiler.
All content and source code for this package are subject to the terms of the MIT License.
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.
- Windows desktop apps
- Windows 11
- Windows 10
- Windows 8.1
- Windows 7 Service Pack 1
- Visual Studio 2022
- Visual Studio 2019
- clang/LLVM v12 - v20
- CMake 3.21