次の方法で共有


texdp3 - ps

テクスチャ レジスタ番号のデータと、宛先レジスタ番号に対応するテクスチャ座標セットの間で、3 成分のドット積を実行します。

構文

texdp3 dst, src

 

where

  • 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 命令は、3 成分のドット積を実行し、4 つのカラー チャネルすべてにレプリケートします。

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

ピクセル シェーダーの手順