Instructions - vs_1_1
This section contains reference information for the vertex shader version 1_1 instructions.
There are several types of vertex shader instructions, as shown in the table. Columns to the right mean the following:
- Instruction slots - Number of instruction slots used by each instruction.
- Setup - Non-arithmetic instructions. Every shader must have a version instruction and it must be the first instruction.
- Arithmetic - These instructions provide the mathematical operations in a shader.
- New - These instructions are new to this version.
Instruction Set
Name | Description | Instruction slots | Setup | Arithmetic | New |
---|---|---|---|---|---|
add - vs | Add two vectors | 1 | x | x | |
dcl_usage input (sm1, sm2, sm3 - vs asm) | Declare input vertex registers (see Registers - vs_1_1) | 0 | x | x | |
def - vs | Define constants | 0 | x | x | |
dp3 - vs | Three-component dot product | 1 | x | x | |
dp4 - vs | Four-component dot product | 1 | x | x | |
dst - vs | Calculate the distance vector | 1 | x | x | |
exp - vs | Full precision 2x | 10 | x | x | |
expp - vs | Partial precision 2x | 1 | x | x | |
frc - vs | Fractional component | 3 | x | x | |
lit - vs | Partial lighting calculation | 1 | x | x | |
log - vs | Full precision log₂(x) | 10 | x | x | |
logp - vs | Partial precision log₂(x) | 1 | x | x | |
m3x2 - vs | 3x2 multiply | 2 | x | x | |
m3x3 - vs | 3x3 multiply | 3 | x | x | |
m3x4 - vs | 3x4 multiply | 4 | x | x | |
m4x3 - vs | 4x3 multiply | 3 | x | x | |
m4x4 - vs | 4x4 multiply | 4 | x | x | |
mad - vs | Multiply and add | 1 | x | x | |
max - vs | Maximum | 1 | x | x | |
min - vs | Minimum | 1 | x | x | |
mov - vs | Move | 1 | x | x | |
mul - vs | Multiply | 1 | x | x | |
nop - vs | No operation | 1 | x | x | |
rcp - vs | Reciprocal | 1 | x | x | |
rsq - vs | Reciprocal square root | 1 | x | x | |
sge - vs | Greater than or equal compare | 1 | x | x | |
slt - vs | Less than compare | 1 | x | x | |
sub - vs | Subtract | 1 | x | x | |
vs | Version | 0 | x | x |
Related topics