Game Development Reference
In-Depth Information
Before moving on, we must mention one important point about why
deferred rendering is popular. When multiple light sources illuminate the
same surface point, hardware limitations or performance factors may pre-
vent us from computing the final color of a pixel in a single calculation, as
was shown in the pseudocode listings for both forward and deferred render-
ing. Instead, we must using multiple passes, one pass for each light, and
accumulate the reflected light from each light source into the frame buffer.
In forward rendering, these extra passes involve rerendering the primitives.
Under deferred rendering, however, extra passes are in image space, and
thus depend on the 2D size of the light in screen space, not on the com-
plexity of the scene! It is in this situation that deferred rendering really
begins to have large performance advantages over forward rendering.
10.1.2 Describing Surface Properties: The BRDF
Now let's talk about the second step in the rendering algorithm: lighting.
Once we have located the surface closest to the eye, we must determine the
amount of light emitted directly from that surface, or emitted from some
other source and reflected off the surface in the direction of the eye. The
light directly transmitted from a surface to the eye—for example, when
looking directly at a light bulb or the sun—is the simplest case. These
emissive surfaces are a small minority in most scenes; most surfaces do not
emit their own light, but rather they only reflect light that was emitted from
somewhere else. We will focus the bulk of our attention on the nonemissive
surfaces.
Although we often speak informally about the “color” of an object, we
know that the perceived color of an object is actually the light that is en-
tering our eye, and thus can depend on many different factors. Important
questions to ask are: What colors of light are incident on the surface, and
from what directions? From which direction are we viewing the surface?
How “shiny” is the object? 4 So a description of a surface suitable for use in
rendering doesn't answer the question “What color is this surface?” This
question is sometimes meaningless—what color is a mirror, for example?
Instead, the salient question is a bit more complicated, and it goes some-
thing like, “When light of a given color strikes the surface from a given
incident direction, how much of that light is reflected in some other partic-
ular direction?” The answer to this question is given by the bidirectional
reflectance distribution function, or BRDF for short. So rather than “What
color is the object?” we ask, “What is the distribution of reflected light?”
4 Further relevant questions that should influence what color we write into the frame
buffer could be asked concerning the general viewing conditions, but these issues have
no bearing on the light coming into our eye; rather, they affect our perception of that
light.
 
Search WWH ::




Custom Search