def - vs

def - vs

Defines vertex shader constants.

Syntax

def dst, float1, float2, float3, float4

 

where

  • dst is the destination register.
  • float1, float2, float3, float4 are four floating point numbers.

Remarks

Vertex shader versions1_12_02_x2_sw3_03_sw
defxxxxxx

 

The def 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 API methods SetVertexShaderConstantF.

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

  1. Use def - vs to define the constant directly inside a shader.

    def - vs can only define floating-point constants.

  2. Use the API methods to set a constant.

Related topics

Vertex Shader Instructions
defi - vs
defb - vs

 

 

Show:
© 2016 Microsoft