Microsoft DirectX 9.0

def (Vertex Shader)

Defines vertex shader constants.


def dst, value



Vertex shader versions1_12_02_x2_sw3_03_sw

The def instruction defines a shader constant whose value is loaded anytime a shader is set to a device. These are called immediate constants. Immediate constants take precedence over constants set by application programming interface (API) methods SetVertexShaderConstantF.

There are two ways to set a constant in a shader.

  1. Use def (Vertex Shader) to define the constant directly inside a shader.

    def (Vertex Shader) can only define floating-point constants.

  2. Use the API methods to set a constant.

Instruction Information

Minimum operating systemWindows 98

Related Topics

© 2002 Microsoft Corporation. All rights reserved.