I am currently experimenting with Vulkan and trying to understand the gist of things. In this one scenario I am attempting to render some quads to a render target and then display the results as a texture.

The problem is that when I try sampling from the color attachment, all that I am getting is a blank image. When I started debugging this in RenderDoc, it DOES appear that the scene has been successfully drawn to the attachment, but while observing the output, it's blank.

I am using two render passes, one of the render target and then the second one for displaying the results and also used to present to the swap chain. I also tested by drawing the quads directly to the final scene and it displays everything as expected, but not from the offscreen render target.

This first image shows the contents drawn to the offscreen render target:


Then when I try setting up the final pass to draw a quad with the texture being of the color attachment used in the previous pass, I get this:


However, according to RenderDoc, the attachment itself still has the scene from the previous render pass, yet its not showing up when I try sampling from it. Even if I try forcing a layout transition of the attachment image to VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL still didn't resolve the issue.

I am sure you folks will be asking a lot of questions so I will try answering as many questions as possible. I have also linked the .RDC file for those who want to view it in RenderDoc which can be grabbed here: https://puu.sh/AS99c/0369bc8ea0.rdc

I appreciate everyone's time and patience


Edit: Also yes, the quad for displaying the color attachment is small, which I am aware of, so I am expecting it to look squished.