I am combining the samples from Sascha Willems https://github.com/SaschaWillems/Vulkan
Specifically the textureArray and the sceneRendering.
Now, the sample acknowledges the possibility that textures may have different sizes, the bufferCopyRegions seem to care for just that.
What I do not get is the
part, where the extend (width, height) of the array are stored.
The extend is provided by an TextureArrayLoader.
I want to combine the individual Textures by copying sub regions together.
Is the extend of a textureArray the maximum of the individuals? Or how does it work?
I have never used texture Arrays in GL because of bindless, hence my ignorance.
Now, the extend defines the size of each texture in the array. All layers in your texture array need to have the same size.
Partially. The extent specifies the dimensions of ALL layers in your texture array, and as such you cannot have different layers with different dimensions in the same texture array. But there is nothing stopping your from putting a smaller texture into an array layer and wasting some space, though this may not work if you want to repeat your textures.
But I guess you create the array offline (like I did for my example), so simply take the biggest dimensions as the size for your array and let the offline application that you use to generate the texture array upscale smaller textures.
If you’re generating at runtime (including loading single files from disk into one array) you can use vkCmdBlitImage to let the API do the scaling including filtering.
Thank you for your reply.
This seems very cumbersome and leads me back to an earlier question. Will there be bindless textures in vulkan or is bindless not the vulkan way?
[QUOTE=Christoph;40480]Thank you for your reply.
This seems very cumbersome and leads me back to an earlier question. Will there be bindless textures in vulkan or is bindless not the vulkan way?[/QUOTE]
The equivalent of “bindless” in Vulkan is that you use arrays of textures, as I said previously. This allows you to put large numbers of textures in a single descriptor and index them with an index. The textures can have different sizes and everything. And not every texture in the array even needs to be filled in (so long as you don’t actually use it).
However, just like ARB_bindless_texture, not all hardware can handle that. Note that Intel has never and likely will never support ARB_bindless_texture. So let’s not pretend that this was core OpenGL functionality or anything.
You need to make a decision: do you want to use the solution that works on all platforms Vulkan supports, or do you want the solution that is easiest on you but can’t work on some hardware?
OK, it seems that I have confused “arrays of textures” with texture arrays?
Because, textureArrays must be equally sized?
Edit: somhow missed the link/update.
Excellent thats what I am gonna do.