Skip to content

D3DX11CreateEffectFromFile

Chuck Walbourn edited this page May 14, 2021 · 6 revisions

Creates an effect from a complied shader blob on disk.

HRESULT WINAPI D3DX11CreateEffectFromFile(
   LPCWSTR pFileName,
   UINT FXFlags,
   ID3D11Device *pDevice,
   ID3DX11Effect **ppEffect );

This function is not present in the legacy DirectX SDK version of Effects 11.

Headers

#include <d3dcompiler.h>
#include "d3dx11effect.h"

Parameters

pFileName: Pointer to filename of compiled shader blob (should have been compiled using the fx_5_0 profile).

FXFlags: Same as D3DCompile Flags2. See D3DCOMPILE_EFFECT.

pDevice: Direct3D device for creating rendering resources and modifying state.

ppEffect: Pointer to the newly created effect instance.

Remark

This is the 'disk file' version of the original D3DX11CreateEffectFromMemory

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 - v15
  • CMake 3.20

Related Projects

DirectX Tool Kit

DirectXMesh

DirectXTex

DXCapsViewer

UVAtlas

DXUT11

DirectX SDK Samples

Clone this wiki locally