title: Debugging a black image in Vulkan
body: <p>I'm trying to render a scene into an image in Vulkan which I want to sample on a quad that's floating around somewhere in that scene.</p>
  
  <p>My approach was to basically do the same steps I used to render the scene into presentation images, except that I would only have a single image in RGBA8 format instead of a presentation-specific format. All I'm seeing, though, is blackness. The validation layers are on and do not report anything. When debugging with RenderDoc, the data seems to be correct. It shows an image of the scene as input to the draw command (see screenshot below).</p>
  
  <p><a href="https://i.stack.imgur.com/n9cK8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/n9cK8.png" alt="Screenshot of RenderDoc, capturing the second frame. API trace on the left side, render pass input for the second independent pass on the right."></a></p>
  
  <p>However, as you can see, the image on the surface is simply black (center of the image on the right-hand side). So how would I go about to debugging this kind of problem? RenderDoc data seems to be what I expect but the result is not. The validation layers are not reporting anything, so I must do something vaguely valid at least.</p>
  
  <hr>
  
  <p>If you want to dig in, full source code for this particular example can be found on <a href="https://github.com/Manuzor/VulkanExperiments/tree/master/Code/Application" rel="nofollow noreferrer">GitHub</a> in <code>Main.cpp</code> and <code>VulkanHelpers.cpp</code>. Look for <code>Vulkan.RenderTarget2</code>.</p>