Texture2DArray vs CubeMap
I'm working on some cascaded shadow mapping algorithm. For now, I'm using 4 cascades, layout as a 4 texture atlas in a single texture. This works fine, but is limited to 2048*2048 for each cascade, and 4 cascades max.
I would like to switch to another implementation, with 6 cascades, and I can't use a single texture anymore. So here are my questions :
- is there any easy way to sample a specific face of a cube map in GLSL ? Something like textureCube(vec2 coords, int faceIndex) ?
- is there any performance reason to prefer using CubeMap or Texture2DArray ?