PSSetShaderResource()の最初のパラメーター:
void PSSetShaderResources(
[in] UINT StartSlot,
[in] UINT NumViews,
[in] ID3D11ShaderResourceView *const *ppShaderResourceViews
);
StartSlot:「デバイスのゼロベースの配列にインデックスを付けてシェーダーリソースの設定を開始します」
では、整数インデックスと.hlsl変数の間の関係は何ですか?d3d9では、すべてが文字列ベースの名前でした。今、これらの整数インデックスには何かが欠けているようです......
シェーダーファイルが1つあるとします。
// shader_1.psh
Texture2D tex ;
そして別の..
// shader_2.psh
TextureCube cubeTex ;
シェーダー_1.pshのみを使用している場合、それらが別々のファイルにある場合、それらをどのように区別しますか?
// something like this..
d3d11devicecontext->PSSetShaderResources( 0, 1, &texture2d ) ;
// index 0 sets 0th texture..
// what index is the tex cube?