• Advertisement
Sign in to follow this  

Cube Texture from Texture Array

This topic is 1228 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,
I come across a problem. I have a Texture Array with 7 elements, and now I want to make from first (or last, it doesn't matter) 6 textures in array a Cube Texture, for later use in shader. Is there a way to create Shader Resource View for that kind of Cube Texture without copying those 6 textures to another resource and then create Shader Resource View?

Share this post


Link to post
Share on other sites
Advertisement

To use a texture as a cubemap, you need to have created the texture resource with the D3D11_RESOURCE_MISC_TEXTURECUBE flag. If you use that flag, I *think* that it forces you to use a multiple of 6 as the array size. You should check yourself to see if that's the case. If it is indeed the case, then you wouldn't be able to do it for your array with size 7. You would have to create a separate texture resource, and then copy the first 6 slices to your cubemap texture.

Share this post


Link to post
Share on other sites
Looks like the size of array is not force to be multiple of 6, at least all of views are created without errors, but I didn't have enough time to check it more precisely. Thanks for help.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement