?/TD>
Microsoft DirectX 9.0

Instructions - vs_2_0


This section contains reference information for the vertex shader version 2_0 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 value1xx
addAdd two vectors1x
callCall a subroutine2xx
callnzCall a subroutine if not zero3xx
crsCross product2xx
dcl_usageDeclare input vertex registers (see Registers - vs_2_0)0x
defDefine a floating-point constant0x
defbDefine a Boolean constant0xx
defiDefine an integer constant0xx
dp3Three-component dot product1x
dp4Four-component dot product1x
dstCalculate a distance vector1x
elseBegin an else block1xxx
endifEnd an if...else block1xx
endloopEnd of a loop block2xx
endrepEnd of a repeat block2xx
expFull precision 2x1x
exppPartial precision 2x1xx
frcFractional component1x
ifBegin an if block3xx
labelLabel0xx
litPartial lighting calculation3x
logFull precision log2(x)1x
logpPartial precision log2(x)1x
loopLoop3xx
lrpLinear interpolation2xx
m3x23x2 matrix multiply2x
m3x33x3 matrix multiply3x
m3x43x4 matrix multiply4x
m4x34x3 matrix multiply3x
m4x44x4 matrix multiply4x
madMultiply and add1x
maxMaximum1x
minMinimum1x
movMove1x
movaMove data from a floating point register to the address register (a0)1xx
mulMultiply1x
nopNo operation1x
nrmNormalize a 4-D vector3xx
powxy3xx
rcpReciprocal1x
repRepeat3xx
retEnd of either a subroutine or main1xx
rsqReciprocal square root1x
sgeGreater than or equal compare1x
sgnSign3xx
sincosSine and cosine8xx
sltLess than compare1x
vsVertex shader version0x


© 2002 Microsoft Corporation. All rights reserved.