?/TD>
Microsoft DirectX 9.0

Instructions - vs_2_x


This section contains reference information for the vertex shader version 2_x instructions.

There are several types of vertex shader instructions, as shown in the table. Columns to the right mean the following:

Instruction Set

NameDescriptionInstruction slotsSetupArithmeticMacro-opsFlow controlNew
absAbsolute value1x
addAdd two vectors1x
breakBreak out of a loop...endloop or rep...endrep block1xx
break_compConditionally break out of a loop...endloop or rep...endrep block, with a comparison3xx
break predBreak out of a loop...endloop or rep...endrep block, based on a predicate3xx
callCall a subroutine2x
callnzCall a subroutine if a boolean register is not zero3xx
callnz predCall a subroutine if a predicate register is not zero3xx
crsCross product2x
dcl_usageDeclare input vertex registers (see Registers - vs_2_x)0x
defDefine constants0x
defbDefine a Boolean constant0x
defiDefine an integer constant0x
dp3Three-component dot product1x
dp4Four-component dot product1x
dstCalculate the distance vector1x
elseBegin an else block1x
endifEnd an if...else block1x
endloopEnd of a loop block2x
endrepEnd of a repeat block2x
expFull precision 2x1x
exppPartial precision 2x1x
frcFractional component1x
ifBegin an if block (using a boolean condition)3x
if compBegin an if block, with a comparison3xx
if predBegin an if block with a predicate condition3xx
labelLabel0x
litPartial lighting calculation3x
logFull precision log2(x)1x
logpPartial precision log2(x)1x
loopLoop3x
lrpLinear interpolation2x
m3x23x2 multiply2x
m3x33x3 multiply3x
m3x43x4 multiply4x
m4x34x3 multiply3x
m4x44x4 multiply4x
madMultiply and add1x
maxMaximum1x
minMinimum1x
movMove1x
movaMove data from a floating-point register to the address register (a0)1x
mulMultiply1x
nopNo operation1x
nrmNormalize a 4-D vector3x
powxy3x
rcpReciprocal1x
repRepeat3x
retEnd of either a subroutine or main1x
rsqReciprocal square root1x
setpSet the predicate register1xx
sgeGreater than or equal compare1x
sgnSign3x
sincosSine and cosine8x
sltLess than compare1x
vsVersion0x


© 2002 Microsoft Corporation. All rights reserved.