?/TD>
Microsoft DirectX 9.0

def (Pixel Shader)


Defines pixel shader floating-point constants.

Syntax

def dest, fVvalue1, fValue2, fValue3, fValue4

Where:

Remarks

Pixel shader versions1_11_21_31_42_02_x2_sw3_03_sw
defxxxxxxxxx

There are two ways to set a floating-point constant in a pixel shader.

  1. Use def to define the constant directly inside a shader.
  2. Use the API to set a constant with IDirect3DDevice9::SetPixelShaderConstantF.

The def instruction defines a shader constant whose value is loaded any time a shader is set to a device. These are called "immediate constants." Immediate constants take precedence over constants set by the application programming interface (API) method.

Instruction Information

Minimum operating systemWindows 98


© 2002 Microsoft Corporation. All rights reserved.