Now that we know how to figure out how fast our shaders are being computed in a frame, the next step is to learn how we can make them go even faster. Optimizing shaders is probably my favorite part about writing them! It always feels like a puzzle, and I love the feedback loop of making an optimization, measuring how much of an impact that had, and then doing it all again.
Profiling is important, because shader optimization is a very deep subject, and in many cases, the types of optimizations that you make will depend on the hardware that you run on. This makes it very difficult to know how ...