This updated edition includes step-by-step instruction on modern OpenGL 4. 0+ GLSL shader programming with C++, along with the theoretical foundations of 3D computer graphics. Every shader stage is explored, from the basics of modeling, textures, lighting, shadows, etc. , through advanced techniques such as tessellation, noise maps, water, and stereoscopy. This new edition includes expanded coverage of camera control, refraction, and a new chapter on ray tracing with bounding volume hierarchies for complex models. The companion files include all the source code, shaders, model files, skyboxes, etc. , needed to run every example in the book.