texdp3tex - ps

执行三分量点积,并使用结果执行 1D 纹理查找。

语法

texdp3tex dst, src

 

其中

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

备注

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

 

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

 
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)

下面是有关如何完成点积和纹理查找的更多详细信息。

texdp3tex 指令执行三分量点积。

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

结果用于通过执行 1D 查找对纹理阶段 m 处的纹理采样。

t (m) RGBA = 使用 (u',0,0) 作为坐标的 TextureSample (级 m) RGBA

像素着色器说明