OpenGL 4.0 Shading Language Cookbook
Author: David Wolf
Publisher: Packt Publishing Ltd.
ISBN: 9781849514767
Pages: 340
By Patrick Mount on 29th November 2011
Before delving into the brave new world of OpenGL 4.0 fragment shaders, make sure that your graphics card can support them. Supported Cards include: Nvidia GeForce 400, 500 series and the ATI Radeon HD 5000, 6000 series
Essentially, this book is aimed at the intermediate to advanced C\C++ programmer, who also has experience with the implementation of fixed-function OpenGL applications, and who wishes to transition into the more direct GPU control-code, which shaders provide.
The book contains clear and concise examples of OpenGL code and it makes frequent reference to a couple of external libraries – GLEW and the GLM (mathematics library). The main IDE seems to be Nokia's Qt Creator, which is a strange choice, given that most professionals are probably using Visual Studio with GLUT.
If what I've just written makes no sense to you whatsoever, then this is not the book for you. It is very 'programmer-centric', covering not just the shaders, but how you bind and interface with them via your main application code. Although for artists like myself, who have a programming background, it is the ideal reference (or should I say recipe) book.
In chapter one, the author eases you into the subject by demonstrating how to create a basic OpenGL application with the additional libraries previously mentioned. I found this a bit tricky because I wasn't use to Qt Creator.
Chapter two introduces the reader to the fundamentals of the GLSL methodology, explaining the difference between vertex and fragment shaders and how they fit within the OpenGL pipeline. This section also refers to the basic shading algorithm of the old fixed-function model as a way of learning about the new shader-based model.
Subsequent chapters develop the simple application into more complex examples, covering topics like; Lighting and Shading Effects, Textures, Cube Mapping, Normal Maps, Screen Space Filters, Gaussian Blur, Bloom, Deferred Shading, Shadow Maps, Geometry and Tessellation Shaders.
Pros:
- Clear and concise example code
- Very detailed written explanations, including the original mathematics
- The structure of the chapters eases you into the more advanced topics
- Impressive coverage of virtually every topic in shader-based real-time rendering
- Programmer-centric (not for the pure video game artist)
- Nokia's Qt Creator was probably not the best choice of IDE for the example code
Rating: 4 out of 5 stars
You definitely need this book in your library (whether it's home, college or business)
Direct Link:
http://www.packtpub.com/opengl-4-0-shading-language-cookbook/book