Multiple Texture Arrays

Suppose a shader uses multiple texture arrays and needs different slices from all of them. What’s the best way to hand the slice info to the shader? Do you just use multiple texture coordinates?


If your textures would otherwise use the same S and T coordinates just the layer index is different then you could pass multiple layer indices instead of one to the shader. Replicating also the S and T coordinates makes sense only if you need different S and T coordinates in case of the different texture arrays (and, of course, those cannot be computed at runtime).