learnopengl.com – Deferred-Shading chapter, GBuffer visualization.
GBuffer
– Position
Use glBlitFramebuffer to copy color buffer to the default framebuffer, so that the color information could be shown in the viewport. By default, the framebuffer’s attachment0 will be used. In this case, it’s Position data.
glBlitFramebuffer(0, 0, SCR_WIDTH, SCR_HEIGHT, 0, 0, SCR_WIDTH, SCR_HEIGHT, GL_COLOR_BUFFER_BIT, GL_NEAREST);

– Normal
For normal data, since it is in attachment 1, we need to tell OpenGL to use framebuffer’s attachment1 color buffer before glBlitFramebuffer.
glReadBuffer(GL_COLOR_ATTACHMENT1);
glBlitFramebuffer(0, 0, SCR_WIDTH, SCR_HEIGHT, 0, 0, SCR_WIDTH, SCR_HEIGHT, GL_COLOR_BUFFER_BIT, GL_NEAREST);

– Albedo
For Albedo data, since it is in attachment 2, we need to tell OpenGL to use framebuffer’s attachment2 color buffer before glBlitFramebuffer.
glReadBuffer(GL_COLOR_ATTACHMENT2);
glBlitFramebuffer(0, 0, SCR_WIDTH, SCR_HEIGHT, 0, 0, SCR_WIDTH, SCR_HEIGHT, GL_COLOR_BUFFER_BIT, GL_NEAREST);

– Composite final image
