I have a conceptual question after hours perusing code and information on the topic of textures, arrays of textures and such.
There is this natural desire to make things perform well and it works beautifully in Vulkan by setting up a big buffer with all the vertices for my all my models and using their corresponding indices I’m able to reduce the vkDrawIndexed calls to the number of models even accomplishing model matrices via push constants.
Great. Now come textures and mess it all up…
Regardless of various techniques I read about I cannot for the world see a way of accomplishing what I want without going down to a per mesh draw loop.
Do I have tunnel vision or is there really no other way and if so how expensive is the potential multiplier effect of draw calls in the command buffer.
In opengl the draw call was THE number 1 cost in such a context - or at least that’s what was said and I could read every where.
Sadly, as nice as all the vast majority of code examples are for starting vulkan, the nitty gritty of establishing a framework to draw models with textures and some movement is something that a whole lot of people will want to accomplish in a good way (decent performance without having to break up render work into n number of chunks depending on textures and instance drawing…
But, yeah, maybe it’s simple and I fail to see it…
oh, forgot one thing: so even transferring texture image data to device local memory initially I’d have to adjust any index in the shader on a per mesh basis which, again, seems to say there is no way around a per mesh draw call.
ok, one last thought added: I see there is a DrawIndirect but I struggle to fully understand that before I have read more about it. If anybody has used it any ideas/comments would be appreciated.