To answer your question about how multiple render targets are presented, it's not that simple but you can imagine at the end of your frame for rendering you have one output presented on screen (although you have rendered to multiple targets in that time).
Whether forward rendering or deferred rendering, you will end up sending a frame to the swap chain. In earlier versions of the swap chain, you grabbed a pointer to the backbuffer frame and rendered everything into it. Later, the addition of SWAP_DISCARD
and SWAP_SEQUENTIAL
were developed. These are the only compatible modes for UWP based applications. These require you to use the resolve resource call for MSAA render targets into the backbuffer, which ever one you choose you must resolve. This is usually your final frame composition as the backbuffer will not be multisampled.
Basically, you can create multiple render targets in memory, and render to each individually OR, you can set multiple render targets and tell your pixel shader to render to each one at the same time (with different data obviously). These render targets are usually have a shader resource view attached also, so they then can be used on the next render pass as source textures.
For example - very simple cascaded set
Pass 1 - Multiple targets
Render Diffuse
Render Normals
Pass 2 - SSAO
Read Z Buffer
Read Normals from Texture
Render Ambient Lighting Frame
pass 3 - combine - Some use screen space quad
Combine Diffuse and Ambient
Render to FinalBuffer
resolve resource to backbuffer
That was a simple example, but you can leverage that pattern to be able to use for on forward and deferred.