Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.

Effects 11

Chuck Walbourn edited this page Oct 25, 2022 · 32 revisions

The original Effects 11 library is documented on Microsoft Docs.

Programming Guide

Reference

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.

  • 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 D3DX11CreateEffectFromMemory function.

  • 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 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.

Building

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.

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_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

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_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.

Archived

These NuGet packages are no longer supported.

Using the vcpkg C++ library manager

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, and uwp triplets are supported.

Dependencies

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.DLL to 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.DLL side-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.

For Use

  • Windows desktop apps
  • Windows 11
  • Windows 10
  • Windows 8.1
  • Windows 7 Service Pack 1

For Development

  • Visual Studio 2022
  • Visual Studio 2019
  • clang/LLVM v12 - v20
  • CMake 3.21

Related Projects

DirectX Tool Kit

DirectXMesh

DirectXTex

DXCapsViewer

UVAtlas

DXUT11

DirectX SDK Samples

Clone this wiki locally