def - ps
Microsoft DirectX 9.0 SDK Update (October 2004)

def - ps


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.



© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.