Understanding a Render Pass
A Render Pass tells us about the framebuffer attachments and subpasses that will be used while rendering. Attachments, such as color and depth, indicate how many color and depth images will be there. It specifies what should be the sample bits used to represent each of them and how the contents will be used in the rendering process. It also confirms how the contents would be treated at the beginning and end of each Render Pass instance. A Render Pass used in a command buffer is called a Render Pass instance. It manages the dependencies between the subpasses and defines the protocols on how the attachments should be used over the course of the subpasses.
A Render Pass consists of mainly two type of components: attachments and subpasses. The following are some facts about attachments and subpasses.
Attachments
An attachment refers to a surface region (such as color, depth/stencil, or resolve attachment to perform resolve operations) used at the time of rendering a...