defi - ps

Defines an integer constant value, which should be loaded any time a shader is set to a device.

Syntax

defi dst, integerValue

 

  • dst is the destination register.
  • integerValue is a constant integer value.

Remarks

Pixel shader versions1_11_21_31_42_02_x2_sw3_03_sw
defixxxx

 

The defi 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 the API method SetPixelShaderConstantB.

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

  1. Use defi to define the constant directly inside a shader.
  2. Use the API methods to set a constant.

 

 

Community Additions

ADD
Show:
© 2014 Microsoft