View Full Version : Multiple Texture Arrays

08-16-2012, 12:41 PM
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?


08-17-2012, 07:05 AM
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).