v
Contents
Preface xv
Part I Graphics and Rendering 1
Chapter 1 Fast Computation of Tight-Fitting Oriented Bounding Boxes 3
Thomas Larsson Linus Källberg
1.1 Introduction 3
1.2 Algorithm 4
1.3 Evaluation 10
1.4 Optimization Using SIMD Instructions 16
1.5 Discussion and Future Work 17
Chapter 2 Modeling, Lighting, and Rendering Techniques for
Volumetric Clouds 21
Frank Kane
2.1 Modeling Cloud Formation 22
2.2 Cloud Lighting Techniques 27
2.3 Cloud Rendering Techniques 30
Chapter 3 Simulation of Night-Vision and Infrared Sensors 45
Frank Kane
3.1 The Physics of the Infrared 45
3.2 Simulating Infrared Sensor Effects 49
3.3 Night-Vision Goggle Simulation 51
vi Contents
Chapter 4 Screen-Space Classification for Efficient Deferred Shading 55
Balor Knight Matthew Ritchie George Parrish
4.1 Introduction 55
4.2 Overview of Method 56
4.3 Depth-Related Classification 58
4.4 Pixel Classification 60
4.5 Combining Classification Results 61
4.6 Index Buffer Generation 62
4.7 Tile Rendering 64
4.8 Shader Management 64
4.9 Platform Specifics 66
4.10 Optimizations 69
4.11 Performance Comparison 72
Chapter 5 Delaying OpenGL Calls 75
Patrick Cozzi
5.1 Introduction 75
5.2 Motivation 75
5.3 Possible Implementations 77
5.4 Delayed Calls Implementation 78
5.5 Implementation Notes 83
5.6 Improved Flexibility 83
5.7 Concluding Remarks 84
Chapter 6 A Framework for GLSL Engine Uniforms 87
Patrick Cozzi
6.1 Introduction 87
6.2 Motivation 87
6.3 Implementation 89
6.4 Beyond GLSL Built-in Uniforms 95
6.5 Implementation Tips 95
6.6 Concluding Remarks 96
Contents vii
Chapter 7 A Spatial and Temporal Coherence Framework for
Real-Time Graphics 97
Michał Drobot
7.1 Introduction 98
7.2 The Spatiotemporal Framework 100
7.3 Applications 109
7.4 Future Work 115
Chapter 8 Implementing a Fast DDOF Solver 119
Holger Grün
8.1 Introduction 119
8.2 Modifying the Basic CR Solver 123
8.3 Results 131
Chapter 9 Automatic Dynamic Stereoscopic 3D 135
Jason Hughes
9.1 General Problems in S3D 135
9.2 Problems in S3D Unique to Games 138
9.3 Dynamic Controls 140
9.4 A Simple Dynamic S3D Camera 141
9.5 Content-Adaptive Feedback 143
Chapter 10 Practical Stereo Rendering 151
Matthew Johnson
10.1 Introduction to Stereo 3D 151
10.2 Overview of Stereo Displays 152
10.3 Introduction to Rendering Stereo 153
10.4 The Mathematics of Stereo Views and Projection 154
10.5 Using Geometry Shader to Render Stereo Pairs 159
Chapter 11 Making 3D Stereoscopic Games 163
Sébastien Schertenleib
11.1 Introduction 163
11.2 How Stereoscopic 3D Works 163
11.3 How to Set Up the Virtual 3D Cameras 164
11.4 Safe Area 166
11.5 Technical Considerations 169
11.6 Same Scene, Both Eyes, and How to Optimize 169
11.7 Scene Traversal 172
viii Contents
11.8 Supporting Both Monoscopic and Stereoscopic Versions 173
11.9 Visual Quality 173
11.10 Going One Step Further 177
11.11 Conclusion 177
Chapter 12 A Generic Multiview Rendering Engine Architecture 179
M. Adil Yalçın Tolga Çapın
12.1 Introduction 179
12.2 Analyzing Multiview Displays 180
12.3 The Architecture 182
12.4 The Multiview Camera 185
12.5 The Multiview Buffer 189
12.6 The Multiview Compositor 190
12.7 Rendering Management 191
12.8 Rendering Optimizations 193
12.9 Discussion 195
Chapter 13 3D in a Web Browser 199
Rémi Arnaud
13.1 A Brief History 199
13.2 Fast Forward 204
13.3 3D with Flash 207
13.4 3D with Java 212
13.5 3D with a Game Engine Plug-In 215
13.6 Google Native Client 218
13.7 3D with HTML5 220
13.8 Conclusion 224
Chapter 14 2D Magic 229
Daniel Higgins
14.1 Tools of the Trade 229
14.2 Position 230
14.3 Color and Opacity 232
14.4 Texture (UV) Coordinates 234
14.5 What a Mesh! 236
14.6 Mesh Architecture 237
14.7 Mesh Examples 239
14.8 Conclusion 248
Contents ix
Part II Game Engine Design 249
Chapter 15 High-Performance Programming with Data-Oriented Design 251
Noel Llopis
15.1 Modern Hardware 251
15.2 Principles of Data-Oriented Design 253
15.3 Data-Oriented Design Benefits 254
15.4 How to Apply Data-Oriented Design 255
15.5 Real-World Situations 256
15.6 Parallelization 259
15.7 Conclusion 261
Chapter 16 Game Tuning Infrastructure 263
Wessam Bahnassi
16.1 Introduction 263
16.2 The Need for Tweak 263
16.3 Design Considerations 264
16.4 The Tuning Tool 265
16.5 Data Exchange 269
16.6 Schema and Exposure 270
16.7 Data Storage 271
16.8 Case Studies 273
16.9 Final Words 276
Chapter 17 Placeholders beyond Static Art Replacement 279
Olivier Vaillancourt Richard Egli
17.1 Placeholder Assets in a Game 279
17.2 Preaching by Example: The Articulated Placeholder Model 285
17.3 Integration in a Production Environment 301
17.4 In the End, Is It Really Needed? 303
17.5 Implementation 304
Chapter 18 Believable Dead Reckoning for Networked Games 307
Curtiss Murphy
18.1 Introduction 307
18.2 Fundamentals 307
18.3 Pick an Algorithm, Any Algorithm 310
18.4 Time for T 313

Get Game Engine Gems 2 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.