Game Development Reference
In-Depth Information
Section 10.11.4 shows some sample shader code that actually uses the
basis vectors to perform bump mapping. The runtime code is surprisingly
simple, once all the data has been munged into the right format. This illus-
trates a common theme of contemporary real-time graphics: at least 75% of
the code is in the tools that manipulate the data—optimizing, packing, and
otherwise manipulating it into just the right format—so that the runtime
code (the other 25%) can run as fast as possible.
10.10
The Real-Time Graphics Pipeline
The rendering equation is the correct way to produce images, assuming you
have an infinite amount of computing power. But if you want to produce
images in the real world on a real computer, you need to understand the
contemporary trade-offs that are being made. The remainder of this chapter
is more focused on those techniques, by attempting to describe a typical
simple real-time graphics pipeline, circa 2010. After giving an overview of
the graphics pipeline, we then descend that pipeline and discuss each section
in more detail, stopping along the way to focus on some key mathematical
ideas. The reader of this section should be aware of several serious flaws in
this discussion:
There is no such thing as the “typical” modern graphics pipeline.
The number of different rendering strategies is equal to the num-
ber of graphics programmers. Everyone has his or her own pref-
erences, tricks, and optimizations. Graphics hardware continues to
evolve rapidly. As evidence, the use of shader programs is now in
widespread use in consumer hardware such as gaming consoles, and
this technology was in its infancy at the time of the writing of the first
edition of this topic. Still, although there is great variance in graph-
ics systems and graphics programmers, most systems do have a great
deal in common. 23 We'd like to reiterate that our goal in this chapter
(indeed, this entire book!) is to give you a solid overview, especially
where the mathematics is involved, from which you can expand your
knowledge. This is not a survey of the latest cutting-edge techniques.
(Real-Time Rendering [1] is the best such survey at the time of this
writing.)
We attempt to describe the basic procedure for generating a single
rendered image with very basic lighting. We do not consider anima-
tion, and we only briefly mention techniques for global illumination
in passing.
23 And most programmers have a lot in common, too, even though we might hate to
admit it.
 
Search WWH ::




Custom Search