Chapter 23. Fragment Shading: Empower Your Pixel Processing
by Benjamin Lipchak
WHAT YOU'LL LEARN IN THIS CHAPTER:
How to alter colors
How to post-process images
How to light an object per-fragment
How to perform procedural texture mapping
As you may recall from Chapter 19, “Programmable Pipeline: This Isn't Your Father's OpenGL,” fragment shaders replace the texturing, color sum, and fog stages of the fixed functionality pipeline. This is the section of the pipeline where the party is happening. Instead of marching along like a mindless herd of cattle, applying each enabled texture based on its pre-ordained texture coordinate, your fragments are free to choose their own adventure. Mix and match textures and texture coordinates. Or calculate your own ...