Graphics Reference
In-Depth Information
of these properties to a buffer (which we would call a geometry buffer, or g-buffer (Saito &
Takahashi, 1990)), we could have a second step where we iterate through the lights in
the scene and calculate the lighting values for each pixel. This is exactly the premise of
deferred rendering, and we will explore many of the properties of this rendering technique
throughout the remainder of this chapter.
11.1.2 The Deferred Rendering Pipeline
The first step of the deferred rendering pipeline (outlined in Figure 11.2) is to render all
scene geometry into a g-buffen, which typically consists of several render target textures.
The individual channels of these textures are used to store geometry surface information
per-pixel, such as surface normal or material properties. The second step is the lighting
phase. In this step, geometry representing the light's area of influence on the screen is ren-
dered, and for each resulting fragment that is shaded, the g-buffer information is sampled
from the render target textures. The g-buffer information is then combined with the light
properties to determine the resulting lighting contribution to that pixel. This contribution is
then summed with the contribution of all other light sources affecting that pixel, to deter-
mine the final, lit color of the surface.
Since deferred rendering avoids the primary drawback of forward rendering (lighting
too tightly coupled with geometry), it has the following advantages:
The number of shader permutations is drastically reduced, since lighting and shadow-
ing calculations can be moved into their own separate shader programs.
Figure 11.2. The deferred rendering pipeline.
Search WWH ::




Custom Search