Author: Farhad Ghayour
Publisher: Packt Publishing Ltd
This book provides step-by-step instruction on modern 3D graphics shader programming in OpenGL with C++, along with its theoretical foundations. It is appropriate both for computer science graphics courses and for professionals interested in mastering 3D graphics skills. It has been designed in a 4-color, “teach-yourself” format with numerous examples and detailed explanations. Every shader stage is explored, starting with the basics of modeling, lighting, textures, etc., up through advanced techniques such as tessellation, soft shadows, and generating realistic materials and environments. The book includes companion files with all of the source code, models, textures, skyboxes and normal maps used in the book. Features: Covers modern OpenGL 4.0+ shader programming in C++, with instructions for both PC/Windows and Macintosh. Illustrates every technique with running code examples. Everything needed to install the libraries, and complete source code for each example is provided and fully explained. Includes step-by-step instruction for using each GLSL programmable pipeline stage (vertex, tessellation, geometry, and fragment). Explores practical examples for modeling, lighting and shadows (including soft shadows), terrain, and 3D materials such as wood and marble. Explains how to optimize code for performance, and use modern development tools such as the NVIDIA® NsightTM debugger. Includes companion files with all of the code, object models, figures, textures, skyboxes and skydomes, height and normal maps used throughout the book.
This new edition provides step-by-step instruction on modern 3D graphics shader programming in OpenGL, along with its theoretical foundations. It is appropriate both for computer science undergraduate graphics programming courses in degree programs that emphasize Java, and for professionals interested in mastering 3D graphics skills who prefer Java. It has been designed in a 4-color, “teach-yourself” format with numerous examples that the reader can run just as presented. New sections have been added covering soft shadows, performance optimization, Nsight debugging, as well as updated industry-standard libraries and steps for running the examples on a Macintosh. Includes companion DVD with source code, models, textures, etc. used in the book. Features: • Includes new sections on implementing soft shadows, performance optimization, and updated tools and libraries such as the JOML math library and Nvidia’s Nsight. • Covers modern OpenGL 4.0+ shader programming in Java, using Windows or Mac. • Illustrates every technique with complete running code examples. Everything needed to install JOGL and run every example is provided and fully explained. • Includes step-by-step instruction for every GLSL programmable pipeline stage (vertex, tessellation, geometry, and fragment) -- with examples.
Every chapter starts with a 'mission briefing' section that describes what is to be achieved by the end of the chapter. This is followed with the decisions and steps required to accomplish the mission objective with challenges to take the project further. The scope for the book thus mimics the reallife requirements of a developer and gets you ready to successfully build your own project. If you are a web designer looking to expand your knowledge of 3D graphics concepts and broaden your existing skill set, then this book is for you. Those looking for an introduction to 3D graphics will benefit from WebGL Hotshot as it is a perfect guide to master 3D concepts, helping you build and deploy 3D worlds much quicker. The book assumes a basic knowledge of HTML, though it can be learned concurrently while reading this book. Basic programming knowledge is useful; however, the graphical nature of web 3D content allows you to learn programming through experimentation.