texdp3tex - ps

Performs a three-component dot product and uses the result to do a 1D texture lookup.

Syntax

texdp3tex dst, src

 

where

  • dst is the destination register.
  • src is a source register.

Remarks

Pixel shader versions1_11_21_31_42_02_x2_sw3_03_sw
texdp3texxx

 

Texture registers must use the following sequence.


 
tex       t(n)        // Define tn as a standard 3-vector (tn must be 
                      // defined in some way before texdp3tex uses it)
texdp3tex t(m), t(n)  // where m > n                 
                      // Perform a three-component dot product between t(n) and 
                      // the texture coordinate set m. Use the scalar result to
                      // do a 1D texture lookup at texturestage m and place
                      // the result in t(m)


Here is more detail about how the dot product and texture lookup are done.

The texdp3tex instruction performs a three-component dot product.

u' = TextureCoordinates(stage m)UVW * t(n)RGB

The result is used to sample the texture at texture stage m by performing a 1D lookup.

t(m)RGBA = TextureSample(stage m)RGBA using (u',0,0) as coordinates

 

 

Community Additions

ADD
Show:
© 2014 Microsoft