Microsoft DirectX 8.1 (vertex shader versions 1.0, 1.1)

def

Defines vertex shader constants.

def dest, fVal0, fVal1, fVal2, fVal3

Registers

vDest
Destination register.
fVal0, fVal1, fVal2, fVal3
Four floating point values.

To learn more about registers, see Registers.

Remarks

There are three ways to define constants in a vertex shader.

  1. Define them directly within the declarator. In this case, there is no need to use the def instruction in the vertex shader.

This also applies to D3DXAssembleShaderFromFile and D3DXAssembleShaderFromResource