To wrap up our section on shader debugging and optimization, I want to spend some time digging into a topic that’s one of the most common sources of shader problems that I’ve encountered in my career: precision problems. These sorts of problems can manifest as visual glitches on any platform, but if you’re writing shaders for platforms like mobile phones, or for web-based applications, precision problems can also be a huge source of performance issues. Luckily, once you understand what’s going on, these sorts of issues are relatively easy to track down and fix.
To start this chapter, I’m going to briefly ...