Microsoft DirectX 8.0 (C++)

def

Provides a method to define constants to be used with the vertex shader.

def   vDest, fVal0, fVal1, fVal2, fVal3

Registers

vDest
Destination register, holding the result of the operation.
fVal0
Source register, specifying the input argument.
fVal1
Source register, specifying the input argument.
fVal2
Source register, specifying the input argument.
fVal3
Source register, specifying the input argument.

Remarks

The following example illustrates how the def instruction might be used.

def c0, 0.0f, 0.0f, 0.0f, 1.0f
def c8, 1.0f, 2.0f, 3.0f, 4.0f

These constants are returned as a declaration fragment to be included in the declaration upon shader creation.