?/TD>
Microsoft DirectX 9.0

Instructions - vs_3_0


This section contains reference information for the vertex shader version 3_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-opsTextureFlow 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 subroutine2xx
callnz predCall a subroutine if a predicate register is not zero3xx
crsCross product2x
dcl_usageDeclare input vertex registers (see Registers - vs_3_0)0x
dcl_textureTypeDeclare the texture dimension for a sampler0xx
defDefine constants0x
defbDeclare a Boolean constant0x
defiDeclare an integer constant0x
dp3Three-component dot product1x
dp4Three-component dot product1x
dstDistance1x
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)3xx
if compBegin an if block, with a comparison3xx
if predBegin an if block with a predicate condition3xx
labelLabel0x
litCalculate lighting3x
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 an integer register1x
mulMultiply1x
nopNo operation1x
nrmNormalize3x
pow2x3x
rcpReciprocal1x
repRepeat3x
retEnd of a subroutine1x
rsqReciprocal square root1x
setpSet the predicate register1x
sgeGreater than or equal compare1x
sgnSign3x
sincosSine and cosine8x
sltLess than compare1x
texldlTexture load with user-adjustable level of detail (LOD)2+3CUBExx
vsVersion0x


© 2002 Microsoft Corporation. All rights reserved.