on November 30, 2011
Title: OpenGL 4.0 Shading Language Cookbook
Author: David Wolf
Publisher: Packt Publishing Ltd.
Review submitted 30th 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, 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.
1. Clear and concise example code
2. Very detailed written explanations, including the original mathematics
3. The structure of the chapters eases you into the more advanced topics
4. Impressive coverage of virtually every topic in shader-based real-time rendering
1. Programmer-centric (not for the pure video game artist)
2. Nokia's Qt Creator was probably not the best choice of IDE for the example code
Rating: 4 out of 5 stars
on November 25, 2011
I got a request from PACKT to review an OpenGL book they've published. It looked like a fun thing to do, so I said okay.
First off, this book is perfect for people who already know their way around OpenGL, but may not be too deep into shaders yet, and/or have some legacy bits in their engines.
The book does walk you through setting up a shader based application, and explains what kinds of support libraries you're going to need (always managing to pick the "other" lib than the ones I've used - they like glew more than glee, for instance - but the libs they picked still work as advertised, so I'm not saying they're bad choises. Oddly, there's no mention of SDL or SFML though), but knowing how OpenGL generally works as well as how the math generally works is taken for granted.
On the positive side you won't have to browse through hundred pages of basic matrix and vector math, or compilation basics, which I feel is a good thing.
After the basics the book gets to the fun stuff, explaining lighting, texture use, screen space trickery (like bloom and deferred shading), geometry shaders and tesselation, practical shadows (i.e, shadow mapping and PCT filters, but doesn't waste pages on anything "more advanced"), noise and some particle tricks.
All in all I think it's a rather good resource for anyone who wants to upgrade their OpenGL knowledge to more "modern OpenGL", dropping all legacy stuff, but it doesn't mean you don't still have to get your hands on the orange book.