Export (0) Print
Expand All

ps_1_1, ps_1_2, ps_1_3, ps_1_4 Instructions

This section contains reference information for the pixel shader version 1_X instructions.

There are several types of pixel shader instructions, as shown in the following table.

Instruction Set

VersionInstruction slots1_11_21_31_4
ps Version number0xxxx
Constant instructions1_11_21_31_4
def - ps Define constants0xxxx
Phase instructions1_11_21_31_4
phase - ps Transition between phase 1 and phase 20x
Arithmetic instructions1_11_21_31_4
add - ps Add two vectors1xxxx
bem - ps Apply a fake bump environment-map transform2x
cmp - ps Compare source to 011xxx
cnd - ps Compare source to 0.51xxxx
dp3 - ps Three-component dot product1xxxx
dp4 - ps Four-component dot product11xxx
lrp - ps Linear interpolate1xxxx
mad - ps Multiply and add1xxxx
mov - ps Move1xxxx
mul - ps Multiply1xxxx
nop - ps No operation0xxxx
sub - ps Subtract1xxxx
Texture instructions1_11_21_31_4
tex - ps Sample a texture1xxx
texbem - ps Apply a fake bump environment-map transform1xxx
texbeml - ps Apply a fake bump environment-map transform with luminance correction1+12xxx
texcoord - ps Interpret texture coordinate data as color data1xxx
texcrd - ps Copy texture coordinate data as color data 1x
texdepth - ps Calculate depth values1x
texdp3 - ps Three-component dot product between texture data and the texture coordinates1xx
texdp3tex - ps Three-component dot product and 1D texture lookup1xx
texkill - ps Cancels rendering of pixels based on a comparison1xxxx
texld - ps_1_4 Sample a texture1x
texm3x2depth - ps Calculate per-pixel depth values1x
texm3x2pad - ps First row matrix multiply of a two-row matrix multiply1xxx
texm3x2tex - ps Final row matrix multiply of a two-row matrix multiply1xxx
texm3x3 - ps 3x3 matrix multiply1xx
texm3x3pad - ps First or second row multiply of a three-row matrix multiply1xxx
texm3x3spec - ps Final row multiply of a three-row matrix multiply1xxx
texm3x3tex - ps Texture look up using a 3x3 matrix multiply1xxx
texm3x3vspec - ps Texture look up using a 3x3 matrix multiply, with non-constant eye-ray vector1xxx
texreg2ar - ps Sample a texture using the alpha and red components1xxx
texreg2gb - ps Sample a texture using the green and blue components1xxx
texreg2rgb - ps Sample a texture using the red, green and blue components1xx

 

  1. 1 slot in ps_1_4; 2 slots in ps_1_2 and ps_1_3
  2. 1 + 1 = 1 arithmetic instruction + 1 texture instruction

 

 

Community Additions

ADD
Show:
© 2014 Microsoft