I’m drawing a basic 3D scene like so:
Two attachments were made
One was given to Color
And the other to Depth
One RenderPass to draw them all
One Framebuffer to draw them to
One CommandBuffer to bring them all
And to the Pipeline bind them
Well, technically one CommandBuffer for each image in the Swapchain, but that’s beside the point.
So let’s say I wanted to draw a 2D UI overlay on top of the 3D scene. The rendering of the UI wouldn’t depend on the 3D output in any way, so it could render in parallel while the 3D was being rendered. Once both are finished, blend the UI on top of the 3D. My question is, can I do this still in just one RenderPass (with possibly several subpasses) by just adding a third attachment? And my second question is, if I wanted multisampling on the UI but not on the 3D, do I then need a separate RenderPass, and maybe a separate Pipeline? And since there are probably many ways of going about this, is there a best practice for this particular common problem?
PS. I’m not sure whether to put this topic in basic or advanced coding, but it feels more of a basic thing so here it goes.