I have few textures that I want to set in my HLSL shader as array. Each texture is represented as ID3D11ShaderResourceView*. Each texture may be DIFFERENT size.
Now, If I set them in D3D as array:
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
And in my HLSL shader I declared:
Texture2D g_textures[3];
Will it be mapped correctly?