GPU Gems 2: Programming Techniques for High-Performance Graphics and General-Purpose Computation Hardcover – Mar 3 2005
Customers Who Bought This Item Also Bought
No Kindle device required. Download one of the Free Kindle apps to start reading Kindle books on your smartphone, tablet, and computer.
Getting the download link through email is temporarily not available. Please check back later.
To get the free app, enter your mobile phone number.
From the Inside Flap
The first volume of GPU Gems was conceived in the spring of 2003, soon after the arrival of the first generation of fully programmable GPUs. The resulting book was released less than a year later and quickly became a best seller, providing a snapshot of the best ideas for making the most of the capabilities of the latest programmable graphics hardware.
GPU programming is a rapidly changing field, and the time is already ripe for a sequel. In the handful of years since programmable graphics processors first became available, they have become faster and more flexible at an incredible pace. Early programmable GPUs supported programmability only at the vertex level, while today complex per-pixel programs are common. A year ago, real-time GPU programs were typically tens of instructions long, while this year’s GPUs handle complex programs hundreds of instructions long and still render at interactive rates. Programmable graphics has even transcended the PC and is rapidly spreading to consoles, handheld gaming devices, and mobile phones.
Until recently, performance-conscious developers might have considered writing their GPU programs in assembly language. These days, however, high-level GPU programming languages are ubiquitous. It is extremely rare for developers to bother writing assembly for GPUs anymore, thanks both to improvements in compilers and to the rapidly increasing capabilities of GPUs. (In contrast, it took many more years before game developers switched from writing their games in CPU assembly language to using higher-level languages.)
This sort of rapid change makes a “gems”-style book a natural fit for assembling the state of the art and disseminating it to the developer community. Featuring chapters written by acknowledged experts, GPU Gems 2 provides broad coverage of the most exciting new ideas in the field.
Innovations in graphics hardware and programming environments have inspired further innovations in how to use programmability. While programmable shading has long been a staple of offline software rendering, the advent of programmability on GPUs has led to the invention of a wide variety of new techniques for programmable shading. Going far beyond procedural pattern generation and texture composition, the state of the art of using shaders on GPUs is rapidly breaking completely new ground, leading to novel techniques for animation, lighting, particle systems, and much more.
Indeed, the flexibility and speed of GPUs have fostered considerable interest in doing computations on GPUs that go beyond computer graphics: general-purpose computation on GPUs, or “GPGPU.” This volume of the GPU Gems series devotes a significant number of chapters to this new topic, including an overview of GPGPU programming techniques as well as in-depth discussions of a number of representative applications and key algorithms. As GPUs continue to increase in performance more quickly than CPUs, these topics will gain in importance for more and more programmers because GPUs will provide superior results for many computationally intensive applications.
With this background, we sent out a public call for participation in GPU Gems 2. The response was overwhelming: more than 150 chapters were proposed in the short time that submissions were open, covering a variety of topics related to GPU programming. We were able to include only about a third of them in this volume; many excellent submissions could not be included purely because of constraints on the physical size of the book. It was difficult for the editors to whittle down the chapters to the 48 included here, and we would like to thank everyone who submitted proposals.
The accepted chapters went through a rigorous review process in which the book’s editors, the authors of other chapters in the same part of the book, and in some cases additional reviewers from NVIDIA carefully read them and suggested improvements or changes. In almost every case, this step noticeably improved the final chapter, due to the high-quality feedback provided by the reviewers. We thank all of the reviewers for the time and effort they put into this important part of the production process.Intended Audience
We expect readers to be familiar with the fundamentals of computer graphics and GPU programming, including graphics APIs such as Direct3D and OpenGL, as well as GPU languages such as HLSL, GLSL, and Cg. Readers interested in GPGPU programming may find it helpful to have some basic familiarity with parallel programming concepts.
Developers of games, visualization applications, and other interactive applications, as well as researchers in computer graphics, will find GPU Gems 2 an invaluable daily resource. In particular, those developing for next-generation consoles will find a wealth of timely and applicable content.Trying the Examples
GPU Gems 2 comes with a CD-ROM that includes code samples, movies, and other demonstrations of the techniques described in the book. This CD is a valuable supplement to the ideas explained in the book. In many cases, the working examples provided by the authors will provide additional enlightenment.Acknowledgments
An enormous amount of work by many different people went into this book. First, the contributors wrote a great collection of chapters on a tight schedule. Their efforts have made this collection as valuable, timely, and thought provoking as it is.
The section editors—Kevin Bjorke, Cem Cebenoyan, Simon Green, Mark Harris, Craig Kolb, and Matthias Wloka—put in many hours of hard work on this project, working with authors to polish their chapters and their results until they shone, consulting with them about best practices for GPU programming, and gently reminding them of deadlines. Without their focus and dedication, we’d still be working through the queue of submissions. Chris Seitz also kindly took care of many legal, logistical, and business issues related to the book’s production.
Many others at NVIDIA also contributed to GPU Gems 2. We thank Spender Yuen once again for his patience while doing a wonderful job on the book’s diagrams, as well as on the cover. Helen Ho also helped with the illustrations as their number grew to more than 150. We are grateful to Caroline Lie and her team for their continual support of our projects. Similarly, Teresa Saffaie and Catherine Kilkenny have always been ready and willing to provide help with copyediting as our projects develop. Jim Black coordinated communication with a number of developers and contributors, including Tim Sweeney, to whom we are grateful for writing a wonderfully focused and astute Foreword.
At Addison-Wesley Professional, Peter Gordon, Julie Nahil, and Kim Boedigheimer oversaw this project and helped to expedite the production pipeline so we could release this book in as timely a manner as possible. Christopher Keane’s copyediting skills and Jules Keane’s assistance improved the content immeasurably, and Curt Johnson helped to market the book when it was finally complete.
The support of several members of NVIDIA’s management team was instrumental to this project’s success. Mark Daly and Dan Vivoli saw the value of putting together a second volume in the GPU Gems series and supported this book throughout. Nick Triantos allowed Matt the time to work on this project and gave feedback on a number of the GPGPU chapters. Jonah Alben and Tony Tamasi provided insightful perspectives and valuable feedback about the chapter on the GeForce 6 Series architecture. We give sincere thanks to Jen-Hsun Huang for commissioning this project and fostering the innovative, challenging, and forward-thinking environment that makes NVIDIA such an exhilarating place to work.
Finally, we thank all of our colleagues at NVIDIA for continuing to push the envelope of computer graphics day by day; their efforts make projects like this possible.
Randima (Randy) Fernando
From the Back Cover
“GPU Gems 2isn’t meant to simply adorn your bookshelf—it’s required reading for anyone trying to keep pace with the rapid evolution of programmable graphics. If you’re serious about graphics, this book will take you to the edge of what the GPU can do.”
—Remi Arnaud, Graphics Architect at Sony Computer Entertainment
“The topics covered inGPU Gems 2are critical to the next generation of game engines.”
—Gary McTaggart, Software Engineer at Valve, Creators ofHalf-LifeandCounter-Strike
This sequel to the best-selling, first volume ofGPU Gemsdetails the latest programming techniques for today’s graphics processing units (GPUs). As GPUs find their way into mobile phones, handheld gaming devices, and consoles, GPU expertise is even more critical in today’s competitive environment. Real-time graphics programmers will discover the latest algorithms for creating advanced visual effects, strategies for managing complex scenes, and advanced image processing techniques. Readers will also learn new methods for using the substantial processing power of the GPU in other computationally intensive applications, such as scientific computing and finance. Twenty of the book’s forty-eight chapters are devoted to GPGPU programming, from basic concepts to advanced techniques. Written by experts in cutting-edge GPU programming, this book offers readers practical means to harness the enormous capabilities of GPUs.
Major topics covered include:
- Geometric Complexity
- Shading, Lighting, and Shadows
- High-Quality Rendering
- General-Purpose Computation on GPUs: A Primer
- Image-Oriented Computing
- Simulation and Numerical Algorithms
Contributors are from the following corporations and universities:
1C: Maddox Games
Armstrong State University
GSC Game World
Massachusetts Institute of Technology
Siemens Corporate Research
Siemens Medical Solutions
Sony Pictures Imageworks
Stony Brook University
Technische Universität München
University of California, Davis
University of North Carolina at Chapel Hill
University of Potsdam
University of Tokyo
University of Toronto
University of Utah
University of Virginia
University of Waterloo
Vienna University of Technology
VRVis Research Center
Section editors include NVIDIA engineers: Kevin Bjorke, Cem Cebenoyan, Simon Green, Mark Harris, Craig Kolb, and Matthias Wloka
The accompanying CD-ROM includes complementary examples and sample programs.
See all Product Description
Most Helpful Customer Reviews on Amazon.com (beta)
The book is divided into six parts: geometric complexity, shading, high-quality rendering, general purpose computation on the GPU, image oriented computing, and numerical algorithms. A part has anywhere from five to twelve chapters. Each chapter is written by a different author but the format and style is consistent. The chapters have an introduction, discussion of the problem or technique, conclusion, and references. The material is presented with color illustrations and occasionally some pseudo-code or code fragments. Generally, the material is extremely current and very approachable to read.
As a sequel to its well received predecessor, the text focuses on taking advantage of the computational power and features of today's high-powered GPU boards. The first part of the book, geometric complexity, emphasizes this with chapters dedicated to batch rendering, using multi-streaming, hardware occlusion, and displacement pixel-shaders. Each chapter illustrates how operations traditionally performed on the CPU can be moved into the GPU for efficiency and greater effect.
The subsequent two parts on shading and rendering continue along the same theme: improved performance by using hardware functionality found on the GPU. Each topic considers the performance ramifications and GPU capabilities when discussing the problem domain of a rendering technique and factors it into the final solution. For example, chapter 10 considers irradiance environment maps for fast lighting - but with a twist - using the GPU to do the calculations in real-time. In doing so, the book's real value becomes apparent.
The fourth part on general purpose GPU computation is an interesting addition to the text. The chapters illustrate methods of offloading traditional CPU tasks by exploiting the inherent parallel nature of modern GPU hardware. Since the book features Nvidia hardware, the architecture and performance capabilities largely focused on their products.
In the fifth part of the book, hardware assisted image creation and analysis is considered. By using context clues from the spatial, texture, or lighting data - additional refinements can be made to a scene prior to rasterization. The topics presented in this part are further refinements of the text's main theme (using the GPU fully) and are specific solutions to uncommon problems - or approaches to rasterization. None the less as GPUs continue to evolve, the topics presented in this section will undoubtedly become more common.
Finally, the sixth part of the book provides several non-traditional graphics examples to illustrate calculating data on the GPU: solving linear equations, options pricing, and numerical simulation - just to name a few. As using the raw floating point power of modern GPU is a growing trend - these sections were quite interesting and well done.
The included CD-ROM contains examples to 28 of the 48 articles in the book. In most cases, the example material includes source code as well as pre-compiled binaries to help illustrate the topic presented in the text. In order to run the majority of the samples, Cg must be installed on the host computer. In addition, the CD-ROM provides access to Nvidia's software development kit, Cg toolkit, performance tools, and several helpful reference links to on-line sites.
GPU Gems 2 provides a cutting edge view of the capabilities found in today's video cards. The selected articles illustrate that every part of the rendering process can be enhanced in some fashion by fully using the underlying hardware. As such, this book is essential to anyone working with modern GPUs.
The book is divided into six parts, each dealing with a different aspect of GPU programming. Compared to the first book, more emphasis is put on the quickly evolving area of general-purpose computation on GPUs (also called GPGPU). In particular, the last three of the six parts of the book are about GPGPU and its applications. The first three parts, however, are about real-time computer graphics.
The first part of the book contains 8 chapters on photo-realistic rendering that mostly deal with how to efficiently render a large number of objects in a scene, which is a necessity for rendering convincing natural effects, such as grass or trees. Two chapters in this part of the book discuss geometry instancing and segment buffering, and another chapter focuses on using occlusion queries to implement coherent hierarchical occlusion culling.
Other interesting topics in this part of the book include adaptive tessellation of surfaces on the GPU, displacement mapping - an extension to the popular parallax mapping used in some current games - that allows to render realistic bumps on a simple quad, and terrain rendering with geometry clipmaps.
Part two of the book consisting of 11 chapters deals with shading and lighting. This part contains highly interesting chapters on deferred shading in the game S.T.A.L.K.E.R., and computing irradiance environment maps on the GPU in real-time. Furthermore, this part of the book has chapters on rendering atmospheric scattering, implementing bidirectional texture functions on the GPU, dynamic ambient occlusion culling, water rendering, and using shadow mapping with percentage-closer filtering to achieve soft shadows.
The third part of the book consists of 9 chapters on high-quality rendering. Most chapters in this part deal with implementing high-quality filtering in fragment shaders. For example, there is an interesting chapter on filtered line rendering and another chapter on cubic texture filtering. Finally, a GPU-only implementation of improved Perlin Noise is also presented in this part of the book.
The chapters in the fourth part of the book represent an introduction to the fantastic field of GPGPU. The 8 chapters of this part first describe the general streaming architecture of GPUs, and then move on to show how to map conventional CPU data structures and algorithms to the GPU. For example, textures can be regarded as the GPU equivalent to CPU data arrays. There is also a chapter on how to implement flow-control idioms on the GPU and a chapter on optimizing GPU programs.
The 6 chapters of part five of the book are on image-oriented computing and describe a number of GPGPU algorithms for performing global illumination computations, for example by using radiosity, on the GPU. There is also a chapter on doing computer vision on the GPU
The final chapter in this part of the book explains how to perform conservative rasterization, which is important for some GPGPU algorithms to achieve accurate results.
The final part of the book has 6 chapters that present GPGPU techniques to perform a variety of simulation and numerical algorithms on the GPU. One chapter shows how to map linear algebra operations onto the GPU and develops a GPU framework to solve systems of linear equations. In other chapters the GPU is used for protein structure prediction, options pricing, flow simulation, and medical image reconstruction. These chapters show good examples of how the GPU can be used for non-graphics-related tasks.
The book contains many illustrations and diagrams that visualize the results of certain techniques or explain the presented algorithms in more detail. All images in the book are in color, which is definitely advantageous for a graphics book. In my opinion, the excellent quality and also the quantity of images and illustrations is one of the strongest points of this book compared to other graphics books.
The book also comes with a CD-ROM with supplemental material, videos, and demo applications to some chapters. Most of the applications include the full source code, which makes it easy to experiment with the techniques presented in the book. Note that most of the applications run on Windows only and many of them require a shader model 3.0 graphics card.
I highly recommend this book to any professional working as graphics or game developer. It is a valuable addition to my library of graphics books and I will come back to a number of articles in the near future. The focus on GPGPU in the second half of the book is a welcome addition and we can expect to see more and more non-graphics-related applications make use of the processing power in today's GPUs.
The one section of the book that is pretty accessible to anyone with knowledge of computer architecture and computer graphics would be section 4 of the book, which is about general purpose computation on GPU's themselves. That section has a series of articles that comprise an excellent tutorial on GPU's, what they are, and what they can do. It is the best material in print I have seen on the subject.
If you want a good introduction into the concept of writing shaders plus practice with an actual shading language, try "OpenGL Shading Language, 2nd Edition" by Rost, assuming you already know OpenGL. For a great on-line resource for modeling and graphics that will get you going in the right direction of knowing what the authors of these articles know, type "Elias Hugo" into Google and check out the first address shown. There is a wealth of on-line articles, complete with math and pseudocode, available there. Then, maybe, you will be ready to sift some knowledge from this "GPU Gems" series.
I notice that the table of contents is not shown by Amazon, so I list the articles here:
PART 1:GEOMETRIC COMPLEXITY
Towards Photorealism in Virtual Botany
Terrain Rendering using GPU-Based Geometry Clipmaps
Inside Geometry Instancing
Optimizing Resource Management with Multi-Streaming
Hardware Occlusion Queries Made Useful
Adaptive Tessellation of Subdivision Surfaces with Displacement Mapping
Per-Pixel Displacement Mapping with Distance Functions
PART 2:SHADING, LIGHTING, AND SHADOWS
Deferred Shading in STALKER
Real-Time Computation of Dynamic Irradiance Environment Maps
Approximate Bidirectional Texture Functions
Tile-Based Texture Mapping
Implementing the Mental Images Phenomena Renderer on the GPU
Dynamic Ambient Occlusion and Indirect Lighting
Blueprint Rendering and "Sketchy Drawings"
Accurate Atmospheric Scattering
Efficient Soft-Edged Shadows Using Pixel Shader Branching
Using Vertex Texture Displacement for Realistic Water Rendering
Generic Refraction Simulation
PART 3:HIGH-QUALITY RENDERING
Fast Third-Order Texture Filtering
High Quality Antialiased Rasterization
Fast Prefiltered Lines
Hair Animation and Rendering in the Nalu Demo
Using Lookup Tables to Accelerate Color Transformations
GPU Image Processing in Apple's Motion
Implementing Improved Perlin Noise
Advanced High-Quality Filtering
Mipmap Level Measurement
PART 4:GENERAL PURPOSE COMPUTATION ON GPUS: A PRIMER
Streaming Architectures and Technology Trends
The GeForce 6 Series GPU Architecture
Mapping Computational Concepts to GPUs
GPU Computation Strategies and Tips
Implementing Efficient Parallel Data Structures on GPUs
Flow Control Idioms
GPU Program Optimization
Stream Reduction Operations for GPGPU Applications
PART 5:IMAGE-ORIENTED COMPUTING
Octree Textures on the GPU
High-Quality Global Illumination Rendering Using Rasterization
Global Illumination using Progressive Refinement Radiosity
Computer Vision on the GPU
Deferred Filtering: Rendering from Difficult Data Formats
PART 6:SIMULATION AND NUMERICAL ALGORITHMS
GPU Computing for Protein Structure Prediction
A GPU Framework for Solving Systems of Linear Equations
Options Pricing on the GPU
Improved GPU Sorting
Flow Simulation with Complex Boundaries
Medical Image Reconstruction with the FFT
I have to admit, though, my interest lies largely in the last 20 chapters. In this section, authors from university and industry research teams describe "GPGPU" - general processing on GPUs. This puts the incredible computing power of the GPU to use on tasks from linear algebra and differential equations to finance, computer vision, fluid flow, and medical imaging, instead of rendering viewable pictures. GPGPU promises huge performance increases over standard CPUs, but imposes huge barriers to realizing that promise. GPUs achieve their high performance by tailoring their physical architecture to a specific class of computations. That class is large, granted, but still covers only a tiny portion of today's compute-intensive tasks - and if your computation doesn't match the GPU model, you're just out of luck. These chapters offer tips'n'tricks for overcoming the architectural barrier, for rethinking applications in terms that GPUs can handle effectively.
GPGPU has been around for only a few years, largely as isolated acts of individual cleverness. No organized body of knowledge and practice exists for explointing this computational resource, and none seems likely to exist for some years to come. Every body of knowledge goes through that stage, "button collecting" of scattered, unrelated facts, the necessary elements from which larger patterns will some day be drawn. This collection, even if hit-or-miss for any one reader's needs, does its part to collect today's techniques and to disseminate that knowledge. Maybe some day, GPGPU will be as common and systematic as C programming is today - until then, anthologies like this are what we have, and this is a good one.
Look for similar items by category
- Books > Computers & Technology > Computer Science > Software Engineering > Design Tools & Techniques
- Books > Computers & Technology > Digital Audio, Photography & Video > Digital Photography & Video > Video Production
- Books > Computers & Technology > Graphic Design
- Books > Computers & Technology > Programming > Game Programming
- Books > Computers & Technology > Software
- Books > Computers & Technology > Web Development > Web Design > Web Graphics
- Books > Qualifying Textbooks - Fall 2007 > Computers & Internet
- Books > Textbooks > Computer Science & Information Systems > Graphics & Visualization
- Books > Textbooks > Computer Science & Information Systems > Programming Languages