1
我想在我的HLSL着色器中設置幾個紋理作爲數組。 每個紋理都表示爲ID3D11ShaderResourceView *。 每個紋理可能是不同的大小。將紋理數組發送到DirectX 11中的着色器中
現在,如果我在D3D將它們設置爲數組:
ID3D11ShaderResourceView* m_array[3];
m_array[0] = ...;
m_array[1] = ...;
m_array[2] = ...;
m_deviceContext->PSSetShaderResources(
0, // Start slot
3, // Nb of textures
m_array); // Array
而在我的HLSL着色我宣佈:
Texture2D g_textures[3];
它是否將正確映射?
是否有理由不能嘗試查看結果? – mins 2015-04-06 09:49:55
我們正在重建我們的引擎,我們想知道我們的假設是否正確。 – DannyX 2015-04-06 09:59:54