Effect Format (Direct3D 11)

An effect (which is often stored in a file with a .fx file extension) declares the pipeline state set by an effect. Effect state can be roughly broken down into three categories:

  • Variables, which are usually declared at the top of an effect.
  • Functions, which implement shader code, or are used as helper functions by other functions.
  • Techniques, which can be arranged in effect groups, and implement rendering sequences using one or more effect passes. Each pass sets one or more state groups and calls shader functions.

Diagram of the categories of declarations for effects, including variables at the top, functions in the middle, and techniques at the bottom

The preceding diagram shows the categories of effect state.

The definition of the effect binary format can be found in Binary\EffectBinaryFormat.h in the effects source code.

In this section

TopicDescription

Effect Variable Syntax

An effect variable is declared with the syntax described in this section.

Annotation Syntax

An annotation is a user-defined piece of information, declared with the syntax described in this section.

Effect Function Syntax

An effect function is written in HLSL and is declared with the syntax described in this section.

Effect Technique Syntax

An effect technique is declared with the syntax described in this section.

Effect State Groups

Effect states are name value pairs in the form of an expression.

Effect Group Syntax

An effect group is declared with the syntax described in this section.

 

Related topics

Effects 11 Reference

 

 

Show: