This week I read Shaders for Game Programmers and Artists by Sebastian St-Laurent. If you are unfamiliar with the term ‘shader’ and if you are not a computer programmer then you can skip this article. Because the book assumes both, and thus is not for readers who do not meet those criteria.
No Introductory Text
Shaders for Game Programmers and Artists (SGPA) is not for readers who are new to 3D graphics. The author gives a short refresher on some fundamental concepts but it still assumes you know the basics of what it requires to render such graphics. It also assumes you are comfortable with the disciplines of mathematics common to the field, namely trigonometry and linear algebra. The book gives a brief explanation regarding GPU design. But again it is a reminder of something you should already know instead of being thorough teaching material.
SPGA both supplements these refreshers and describes its original content with diagrams. They are easy to understand and do a great job helping you visualize the ideas at hand—visual aids are not surprising in a text about graphics. These diagrams are perhaps the best aspect of the book considering how they help make the material more accessible.
The author introduces most new ideas, e.g. fog effects, by first explaining the natural, real-world behavior of those concepts. This is another area where the use of diagrams makes the text more approachable. Seeing pictures of how light interacts with objects to create shadows, for example, helps you grasp the concepts by framing them in the context of the physical world.
The content of SPGA is not the easiest to understand, or at least for me, since I did not study graphics programming in earnest for a long time. More than that, the book assumes you are using Windows and thus teaches its techniques through HLSL, Microsoft’s shader language Direct3D. However, I use Linux and deal more with GLSL, which means I had to mentally convert all of the example code. This made it tedious to actually execute the examples.
Next Book of the Week
I certainly recommend Shaders for Game Programmers and Artists, but only for those people who are not green when it comes to the subject. It is a great intermediate text. But readers searching for a complete introduction to the topic should look elsewhere.
Next week I intend to read the AWK Programming Language. Every now and then I encounter a problem and think, “I bet AWK would be useful here.” But I only know the basics of AWK, so by next Sunday I hope to be more knowledgeable about the language by turning to the original source.