In Unity rendering a frame to the screen
occurs in a linear sequence of events.
The Frame Debugger is a tool which lets
you see all the steps involved
in rendering a frame step by step.
It allows you to the see intermediate render targets,
shadow maps and each draw call
that contributes to the frame, in order.
The frame debugger is accessed from
Window - Frame Debugger.
The editor will pause and in the frame debug window
a sequential list of each step involved
in current frame will displayed.
Many of these are draw called.
But they also involve other render related events
like frame buffer clears,
which set the initial colours of the screen,
or compute shader invocation.
A draw call is a command in which the CPU
sends content to be rendered, like meshes,
to the GPU to be rendered as pixels for display.
At the top of the window are two
forward and back buttons
along with a slider, which will allow you to step through this list in order.
Selecting a single step in the process from the main list
will cause that draw call or event,
along with the steps prior to it,
to be drawn in the game view.
If that step is drawing a mesh renderer
the game object with that mesh renderer attached
will be highlighted in the hierarchy.
Viewing a step in the main list allows
you to see where in the overall
process of drawing the frame it occurs.
Related steps are grouped together
and their views can be expanded or collapsed.
Analysing frames in this way is useful
to learn precisely how and in what order
Unity is rendering your frame.
When setting up a new project we
can choose between 4 different render paths.
Each render path renders content differently.
Choosing which to use is highly
dependent on the nature of your project.
To choose a render path for your project
navigate to Edit - Project Settings - Player
and select a rendering path from the drop-down
under Other Settings.
For more information about the available
render paths please see the information linked below.
Each render path can use a different
number of render targets.
A render target is a feature of
GPUs that allow a scene
to be rendered to an intermediate memory buffer.
Using the for Forward rendering path
1 render target is used by default.
Here shown as RT0,
along with a depth buffer.
Using customer shaders it's possible
to use more render targets in forward rendering
but using the standard shader this is
the default behaviour.
This project is in differed rendering mode.
In differed rendering mode multiple render targets are used.
When rendering to multiple targets at once
you can select which display using the drop down menu.
In this example we can see the diffuse,
specular,
normals,
and emission and indirect lighting buffers
in in Unity 5 differed shading mode
using the standard shader.
You can also see the depth buffer by
selecting it from the same drop down.
When an event is highlighted
information will be displayed about that event
in the information panel.
In the case of draw calls the information
panel also includes buttons which will
allow you to isolate and visualise information,
including the red,
green,
blue and alpha channels
of the selected render target.
You can also adjust the brightness of the
display using the levels bracketed slider here.
This can be useful in HDR rendering
to isolate certain luminance ranges
of a frame for analysis.