Effect System Interfaces (Direct3D 11)

The effect system defines several interfaces for managing effect state. There are two types of interfaces: those used by the runtime to render an effect and reflection interfaces for getting and setting effect variables.

Effect Runtime Interfaces

Use runtime interfaces to render an effect.

Runtime Interfaces Description
ID3DX11Effect Collection of one or more groups and techniques for rendering.
ID3DX11EffectPass A collection of state assignments.
ID3DX11EffectTechnique A collection of one or more passes.
ID3DX11EffectGroup A collection of one or more techniques.

 

Effect Reflection Interfaces

Reflection is implemented in the effect system to support reading (and writing) effect state. There are multiple ways to access effect variables.

Setting Groups of Effect State

Use these interfaces to get and set a group of state.

Reflection Interfaces Description
ID3DX11EffectBlendVariable Get and set blend state.
ID3DX11EffectDepthStencilVariable Get and set depth-stencil state.
ID3DX11EffectRasterizerVariable Get and set rasterizer state.
ID3DX11EffectSamplerVariable Get and set sampler state.

 

Setting Effect Resources

Use these interfaces to get and set resources.

Reflection Interfaces Description
ID3DX11EffectConstantBuffer Access data in a texture buffer or constant buffer.
ID3DX11EffectDepthStencilViewVariable Access data in a depth-stencil resource.
ID3DX11EffectRenderTargetViewVariable Access data in a render target.
ID3DX11EffectShaderResourceVariable Access data in a shader resource.
ID3DX11EffectUnorderedAccessViewVariable Access data in an unordered access view.

 

Setting Other Effect Variables

Use these interfaces to get and set state by the variable type.

Reflection Interfaces Description
ID3DX11EffectClassInstanceVariable Get a class instance.
ID3DX11EffectInterfaceVariable Get and set an interface.
ID3DX11EffectMatrixVariable Get and set a matrix.
ID3DX11EffectScalarVariable Get and set a scalar.
ID3DX11EffectShaderVariable Get a shader variable.
ID3DX11EffectStringVariable Get and set a string.
ID3DX11EffectType Get a variable type.
ID3DX11EffectVectorVariable Get and set a vector.

 

All reflection interfaces derive from ID3DX11EffectVariable.

Effects (Direct3D 11)

Programming Guide for Direct3D 11