I understand what the Texture Cube is for. But what is the Texture Cube Array? It seems like it takes in a single Texture Cube, and in the shader it needs to be sampled via a vec4 uvwx…
I’m just curious what this feature is for as it seems completely undocumented!
An “array” of textures, contains many different textures, and you can select which one is actually used at runtime with one of the texture coordinates.
This could help with some art paths, and also help conserve texture samples, so you don’t have to bind each of potentially many textures to an individual sampler.
So, if you’ve ever thought “yeah, I want to use a cube map here, but I want to be able to pick one of 20 different cube maps, based on some calculated shader value,” then this is the object for you!
This is “not documented” because it’s just a standard part of the typical graphics APIs.
Maybe you can learn more by poking around the D3D reference? Something like:
It’s pretty analogous to a 2D texture array, just with cube maps instead of flat textures.
Sweet, was just looking for a usage example. Thank you both! I have some shader which is using a blueprint to dynamically swap the Texture Cube based on the position of the asset… it sounds like this would be a better bet, but I’d need to check how it actually works in Epic’s example.