Click on an instruction to jump to that page

 

abs

m3x2

ps

tex

tex3x2depth

add

m3x3

rcp

texbem

tex3x2pad

bem

m3x4

rsq

texbeml

tex3x3tex

cmp

m4x3

sincos

texcoord

texm3x3

cnd

m4x4

sub

texcrd

texm3x3pad

crs

mad

 

texdepth

texm3x3tex

dcl

max

 

texdp3

texm3x3vspec

def

min

 

texdp3tex

texreg2ar

dp2add

mov

 

texkill

texreg2gb

dp3

mul

 

texld

texreg2rgb

dp4

nop

 

texldb

 

exp

nrm

 

texldp

 

frc

phase

 

 

 

log

pow

 

 

 

lrp

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

abs (macro)

 ps 2.0

 

This macro computes the absolute value of the input register on an element by element basis.


One arithmetic instruction slot.


abs  Dest0, Source0

 

Legal Register Arguments

 

Destination

Source

PS Version

v

c

t

r

v

c

t

r

s

1.0

 

 

 

 

 

 

 

 

 

1.1

 

 

 

 

 

 

 

 

 

1.2

 

 

 

 

 

 

 

 

 

1.3

 

 

 

 

 

 

 

 

 

1.4 Phase 1

 

 

 

 

 

 

 

 

 

1.4 Phase 2

 

 

 

 

 

 

 

 

 

2.0

 

 

 

x

x

x

x

x

 

 

Computes the absolute value of each element of Source0 and places the result in Dest0.

 

abs  r4, r4

 

this macro is equivalent to the following code.

 

cmp Dest0, Source0, Source0, -Source0

 

add

 ps 1.0 – 2.0

 

Adds two source colors and places the sum into a third register.


One arithmetic instruction slot.


add  Dest0, Source0, Source1

 

 

Legal Register Arguments

 

Dest

Source

PS Version

v

c

t

r

v

c

t

r

1.0

 

 

 

x

x

x

x

x

1.1

 

 

x

x

x

x

x

x

1.2

 

 

x

x

x

x

x

x

1.3

 

 

x

x

x

x

x

x

1.4 Phase 1

 

 

 

x

 

x

 

x

1.4 Phase 2

 

 

 

x

x

x

 

x

 

Adds the Source0 and Source1 registers and places the result in the Dest0 register.

 

add  r0,     r0,  c2

add r0,     r0,  1-r1

add  r0,     r0,  t0_bias

 

 

bem

 ps 1.4

 

Bump-Environment-Map. Apply a fake bump environment map transform.


Two arithmetic instruction slots.


bem  Dest0.rg, Source0, Source1

 

Legal Register Arguments

 

Dest

Source0

Source1

PS Version

v

c

t

r

v

c

t

r

v

c

t

r

1.0

 

 

 

 

 

 

 

 

 

 

 

 

1.1

 

 

 

 

 

 

 

 

 

 

 

 

1.2

 

 

 

 

 

 

 

 

 

 

 

 

1.3

 

 

 

 

 

 

 

 

 

 

 

 

1.4 Phase 1

 

 

 

x

 

x

 

x

 

 

 

x

1.4 Phase 2

 

 

 

 

 

 

 

 

 

 

 

 

 

This instruction takes two source registers, applies the 2x2 bump-map matrix to Source1, adds in Source0 and places the result in the destination register. This instruction only operates on the .rg components. The matrix values are set prior to the pixel shader through a SetTextureStage call setting the four D3DTSS_BUMPENVMATnn matrix elements. The destination register number determines the texture stage number. There are no restrictions on modifiers on the source registers. There are restrictions on using the bem instruction;

 

 

Note: This instruction works only in PS 1.4.

 

bem  r3.rg,  r0,  c2 // bump texture 3 * c2, add in r0

bem  r4.xy   c2,  r0 // bump texture 4 * r0, add in c2

 

 

cmp

 ps 1.2 - 2.0

 

Compare: Performs a conditional assignment based upon a comparison of the values in the source registers.


Two arithmetic slots for PS 1.2 & 1.3, One for PS 1.4 & 2.0


cmp  Dest0, Source0, Source1, Source2

 

Legal Register Arguments

 

Dest

Source

PS Version

v

c