Pass array of textures with different dimensions to shader

Started by
10 comments, last by SoldierOfLight 7 years, 5 months ago

I would be surprised if DX does not support arrays of samplers. I know in OpenGL this is supported, the only limitation is that you have to use static indexing to access the array, this may have changed in later version but its possible to have an array of 2D textures of different size and sample them in a shader.

Advertisement

Correct, D3D11 allows you to have up to 128 unique textures in a shader, and it can be declared as an array of Texture2Ds, but requires static indexing. Alternatively, you can have a single texture binding declares as a Texture2DArray, which has all of the dimension restrictions we've been discussing.

D3D12 with SM5.1 enables the former, with an unlimited array size and dynamic indexing.

This topic is closed to new replies.

Advertisement