i
i
i
i
i
i
i
i
Contents
Preface xi
1 Introduction 1
1.1 ContentsOverview ..................... 2
1.2 Notation and Definitions . . . . . . . . . . . . . . . . . . 4
2 The Graphics Rendering Pipeline 11
2.1 Architecture......................... 12
2.2 TheApplicationStage ................... 14
2.3 TheGeometryStage .................... 15
2.4 TheRasterizerStage.................... 21
2.5 Through the Pipeline . . . . . . . . . . . . . . . . . . . . 25
3 The Graphics Processing Unit 29
3.1 GPUPipelineOverview .................. 30
3.2 The Programmable Shader Stage . . . . . . . . . . . . . 30
3.3 The Evolution of Programmable Shading . . . . . . . . . 33
3.4 TheVertexShader ..................... 38
3.5 TheGeometryShader ................... 40
3.6 ThePixelShader...................... 42
3.7 TheMergingStage..................... 44
3.8 Effects............................ 45
4Transforms 53
4.1 BasicTransforms...................... 55
4.2 Special Matrix Transforms and Operations . . . . . . . . 65
4.3 Quaternions......................... 72
4.4 VertexBlending....................... 80
4.5 Morphing .......................... 85
4.6 Projections ......................... 89
5 Visual Appearance 99
5.1 Visual Phenomena . . . . . . . . . . . . . . . . . . . . . 99
5.2 LightSources ........................ 100
vii
i
i
i
i
i
i
i
i
viii Contents
5.3 Material........................... 104
5.4 Sensor ............................ 107
5.5 Shading ........................... 110
5.6 AliasingandAntialiasing.................. 116
5.7 Transparency, Alpha, and Compositing . . . . . . . . . . 134
5.8 GammaCorrection..................... 141
6 Texturing 147
6.1 TheTexturingPipeline................... 148
6.2 ImageTexturing ...................... 156
6.3 ProceduralTexturing.................... 178
6.4 TextureAnimation..................... 180
6.5 MaterialMapping...................... 180
6.6 AlphaMapping....................... 181
6.7 BumpMapping....................... 183
7 Advanced Shading 201
7.1 Radiometry ......................... 202
7.2 Photometry ......................... 209
7.3 Colorimetry......................... 210
7.4 LightSourceTypes..................... 217
7.5 BRDFTheory........................ 223
7.6 BRDFModels........................ 251
7.7 BRDF Acquisition and Representation . . . . . . . . . . 264
7.8 ImplementingBRDFs ................... 269
7.9 Combining Lights and Materials . . . . . . . . . . . . . 275
8 Area and Environmental Lighting 285
8.1 Radiometry for Arbitrary Lighting . . . . . . . . . . . . 286
8.2 AreaLightSources..................... 289
8.3 AmbientLight ....................... 295
8.4 EnvironmentMapping ................... 297
8.5 Glossy Reflections from Environment Maps . . . . . . . 308
8.6 Irradiance Environment Mapping . . . . . . . . . . . . . 314
9 Global Illumination 327
9.1 Shadows........................... 331
9.2 AmbientOcclusion ..................... 373
9.3 Reflections.......................... 386
9.4 Transmittance........................ 392
9.5 Refractions ......................... 396
9.6 Caustics........................... 399
9.7 Global Subsurface Scattering . . . . . . . . . . . . . . . 401
i
i
i
i
i
i
i
i
Contents ix
9.8 FullGlobalIllumination .................. 407
9.9 PrecomputedLighting ................... 417
9.10 PrecomputedOcclusion .................. 425
9.11 Precomputed Radiance Transfer . . . . . . . . . . . . . . 430
10 Image-Based Effects 439
10.1 TheRenderingSpectrum.................. 440
10.2 Fixed-ViewEffects ..................... 440
10.3 Skyboxes........................... 443
10.4 LightFieldRendering ................... 444
10.5 SpritesandLayers ..................... 445
10.6 Billboarding . . . . . . . . . . . . . . . . . . . . . . . . . 446
10.7 ParticleSystems ...................... 455
10.8 DisplacementTechniques.................. 463
10.9 ImageProcessing...................... 467
10.10 ColorCorrection ...................... 474
10.11 ToneMapping........................ 475
10.12 LensFlareandBloom ................... 482
10.13 DepthofField ....................... 486
10.14 MotionBlur......................... 490
10.15 Fog.............................. 496
10.16 VolumeRendering ..................... 502
11 Non-Photorealistic Rendering 507
11.1 ToonShading........................ 508
11.2 Silhouette Edge Rendering . . . . . . . . . . . . . . . . . 510
11.3 OtherStyles......................... 523
11.4 Lines............................. 527
12 Polygonal Techniques 531
12.1 Sources of Three-Dimensional Data . . . . . . . . . . . . 532
12.2 Tessellation and Triangulation . . . . . . . . . . . . . . . 534
12.3 Consolidation........................ 541
12.4 Triangle Fans, Strips, and Meshes . . . . . . . . . . . . . 547
12.5 Simplification ........................ 561
13 Curves and Curved Surfaces 575
13.1 ParametricCurves ..................... 576
13.2 Parametric Curved Surfaces . . . . . . . . . . . . . . . . 592
13.3 ImplicitSurfaces ...................... 606
13.4 SubdivisionCurves..................... 608
13.5 SubdivisionSurfaces .................... 611
13.6 EfficientTessellation .................... 629
Get Real-Time Rendering, Third Edition, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.