Graphics Reference
In-Depth Information
Graphics, Inc., and a few other makers of graphics workstations. The
second group formed the core of the special effects and computer-based
animation industry, centered around firms like Lucasfilm and Pixar.
• The good news for the reader is that both approaches won: The success
of the fixed-function approach led to the development of commodity
graphics cards. In less than 20 years, the cost of graphics performance
dropped by a factor of more than a thousand. Meanwhile, the pro-
grammable shading approach showed the world just how much could
be done with graphics that wasn't constrained by interactivity consider-
ations. Finally, Moore's Law meant that processor speeds were improv-
ing enormously, and one year's noninteractive program was next year's
interactive program. The result has been that the movie industry now
uses GPUs, that is, stock graphics hardware, while the game industry
now routinely uses programmable shading.
• The convergence was gradual, however. As the environment changed,
year by year, the tradeoffs between the two approaches could be eval-
uated in the context of current hardware, model size, etc.; the fixed-
function approach gradually lost out to programmability, and all the
ideas from Cook's programmable shaders paper gradually entered the
hardware.
• As a final stage (so far!), it became clear that graphics now looked like
“linking together bits of program in more and more complex pipelines,”
which sounds more like an operating systems problem than a graphics
problem. The design of GL4 reflects this: It's a system for defining bits
of program and linking them together into complete assemblies; the
graphics-specific parts of the design are only a small part, and many of
the graphics-specific ideas of early versions of GL are now deprecated.
33.4 A Simple Graphics Program with Shaders
As we said earlier, the job of a modern graphics system is rather like an operating
system. Three separate entities need to communicate:
• A program running on the CPU (the host program)
• The graphics pipeline: some implementation of the processing of data from
the host program including things like geometric transformations, clipping
and rasterization, compositing, etc.
• The shader programs that run on the GPU
Part of the graphics pipeline may be implemented on the CPU as a library; some
parts may be implemented on the GPU. Part of the function of the graphics system
is to isolate the developer of the host program from these details (which may vary
from computer to computer, and from graphics card to graphics card). Of course,
the developer of the host program is typically also the person who develops the
shader programs. That developer must ask the question, “How do I connect a
variable in my C#/C++/Java/Python program with a corresponding variable in
 
 
 
Search WWH ::




Custom Search