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.FEATURES:Covers modern OpenGL 4.0+ GLSL shader programming with C++, and instructions for both PC/Windows and MacintoshProvides complete source code for each example, fully explained along with tips for performance optimizationIncludes step-by-step instruction for using each GLSL programmable pipeline stage (vertex, tessellation, geometry, and fragment)Designed in a 4-color, teach-yourself format with numerous examples that the reader can run just as presentedExplores practical examples for modeling, lighting, and shadows (including soft shadows), terrain, water, and 3Dmaterials such as wood and marbleExpanded coverage of ray tracing, to include complex models and bounding volume hierarchiesIncludes companion files with source code, shaders, OBJ models, textures, skydomes, normal maps, high resolution figures, and more