Microsoft DirectX 8.1 (pixel shader versions 1.2 and 1.3)

texdp3

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

texdp3 dest, src

Registers

Argument Description RegistersVersion
vn cn tn rn
dest Destination register x 1.2, 1.3
src Source register x 1.2, 1.3

Remarks

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