defi - vs

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


defi dst, integerValue0, integerValue1, integerValue2, integerValue3


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


Vertex shader versions1_12_02_x2_sw3_03_sw


The defi instruction defines an integer 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 SetVertexShaderConstantI.

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

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

Related topics

Vertex Shader Instructions
def - vs
defb - vs