texdp3 - ps

在纹理寄存器编号中的数据与对应于目标寄存器号的纹理坐标集之间执行三分量点积。

语法

texdp3 dst, src

 

其中

  • dst 是目标寄存器。
  • src 是源寄存器。

备注

像素着色器版本 1_1 1_2 1_3 1_4 2_0 2_x 2_sw 3_0 3_sw
texdp3 x x

 

纹理寄存器必须使用以下序列。

 
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)

下面是有关如何实现点积的更多详细信息。

texdp3 指令执行三分量点积,并将其复制到所有四个颜色通道。

t (m) RGBA = TextureCoordinates (阶段 m) UVW * t (n) RGB

像素着色器说明