texdp3 - ps

Performs a three-component dot product between data in the texture register number and the texture coordinate set corresponding to the destination register number.

Syntax

texdp3 dst, src

 

where

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

Remarks

Pixel shader versions 1_1 1_2 1_3 1_4 2_0 2_x 2_sw 3_0 3_sw
texdp3 x x

 

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 texdp3 uses it)
texdp3 t(m), t(n)  // where m > n
                   // Perform a three-component dot product between tn and 
                   //   the texture coordinate set m. The scalar result is
                   //   replicated to all components of t(m)

Here is more detail about how the dot product is accomplished.

The texdp3 instruction performs a three-component dot product and replicates it to all four color channels.

t(m)RGBA = TextureCoordinates(stage m)UVW * t(n)RGB

Pixel Shader Instructions