?/TD>
Microsoft DirectX 9.0

Instructions - ps_3_0


This section contains reference information for the pixel shader version 3_0 instructions.

There are several types of pixel 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
callnzCall a subroutine if a boolean register is not zero3x
callnz predCall a subroutine if a predicate register is not zero3xx
cmpCompare source to 01x
crsCross product2x
dcl_textureTypeDeclare the texture dimension for a sampler0x
dcl_usageDeclare the association between vertex shader output registers and pixel shader input registers.0xx
defDefine constants0x
defbDefine a Boolean constant0xx
defiDefine an integer constant0xx
dp2add2-D dot product and add2x
dp33-D dot product1x
dp44-D dot product1x
dsxRate of change in the x-direction2x
dsyRate of change in the y direction2x
elseBegin an else block1x
endifEnd an if...else block1x
endloopendloop2xx
endrepEnd of a repeat block2x
expFull precision 2x1x
frcFractional component1x
ifBegin an if block3xx
if compBegin an if block with a comparison3xx
if predBegin an if block with predication3xx
labelLabel0x
logFull precision log2(x)1x
loopLoop3xx
lrpLinear interpolate2x
m3x23x2 multiply2x
m3x33x3 multiply3x
m3x43x4 multiply4x
m4x34x3 multiply3x
m4x44x4 multiply4x
madMultiply and add1x
maxMaximum1x
minMinimum1x
movMove1x
mulMultiply1x
nopNo operation1x
nrmNormalize3x
pow2x3x
psVersion0xx
rcpReciprocal1x
repRepeat3x
retEnd of a subroutine1x
rsqReciprocal square root1x
setpSet the predicate register1x
sincosSine and cosine8x
subSubtract1x
texkillKill pixel render2x
texldSample a texture1 + 3CUBEx
texldbTexture sampling with level of detail (LOD) bias from w-component6x
texldlTexture sampling with LOD from w-component2 + 3CUBExx
texlddTexture sampling with user-provided gradients3xx
texldpTexture sampling with projective divide by w-component3 + 1CUBEx

Where:



© 2002 Microsoft Corporation. All rights reserved.