ps_2_0 Instructions
Microsoft DirectX 9.0 SDK Update (October 2004)

ps_2_0 Instructions


This section contains reference information for the pixel shader version 2_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 slotsSetupArithmeticTextureNew
absAbsolute value1xx
addAdd two vectors1x
cmpCompare source to 01x
crsCross product2xx
dcl_samplerTypeDeclare the texture dimension for a sampler0xx
dclDeclare the association between vertex shader output registers and pixel shader input registers.0xx
defDefine constants0x
dp2add2-D dot product and add2xx
dp33-D dot product1x
dp44-D dot product1x
expFull precision 2x1xx
frcFractional component1xx
logFull precision log2(x)1xx
lrpLinear interpolate2x
m3x23x2 multiply2xx
m3x33x3 multiply3xx
m3x43x4 multiply4xx
m4x34x3 multiply3xx
m4x44x4 multiply4xx
madMultiply and add1x
maxMaximum1xx
minMinimum1xx
movMove1x
mulMultiply1x
nopNo operation1x
nrmNormalize3xx
powxy3xx
psVersion0x
rcpReciprocal1xx
rsqReciprocal square root1xx
sincosSine and cosine8xx
subSubtract1x
texkillKill pixel render1x
texldSample a texture1xx
texldbTexture sampling with level of detail (LOD) bias from w-component1xx
texldpTexture sampling with projective divide by w-component1xx


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.