defb - vs

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


defb dest, booleanValue



  • dst is the destination register.
  • booleanValue is a boolean value, either True or False.


Vertex shader versions1_12_02_x2_sw3_03_sw


The defb - vs instruction defines a boolean 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 SetVertexShaderConstantB.

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

  1. Use defb - vs to define the constant directly inside a shader.
  2. Use the API methods to set a constant.

Related topics

Vertex Shader Instructions
def - vs
defi - vs