Microsoft DirectX 8.1 (pixel shader versions 1.0, 1.1, 1.2, 1.3, 1.4)

Order of Operations

Pixel shaders instructions can be modified by a combination of source register modifiers, instruction modifiers, and destination register write masks. The result of the instruction is determined by the order in which they are executed. The sequence shown below identifies the order in which source register modifiers, instruction modifiers, and destination register write masks are executed.

  1. Execute source register selector(s) and source register modifier(s) .
  2. Execute instruction.
  3. Execute instruction modifier(s).
  4. Update destination register based on destination register write mask(s).

Note  The saturate instruction modifier can be combined with any one of the other instruction modifiers. The source register selector(s) and source register modifier(s) may be combined.