Introduction
It's easy to use shaders to create a smooth looking surface, but that is not always the desired goal. If we want to create realistic looking objects, we need to simulate the imperfections of real surfaces. That includes things such as scratches, rust, dents, and erosion. It is somewhat surprising how challenging it can be to make surfaces look like they have really been subjected to these natural processes. Similarly, we sometimes want to represent natural surfaces such as wood grain or natural phenomena such as clouds.
All of the preceding effects have qualities that are random in nature. Therefore, you might imagine that we could generate them by simply using random data. However, random data such as the kind that is generated from a pseudorandom number generator is not very useful in computer graphics. There are two main reasons:
First, we need data that is repeatable, so that the object will render in the same way during each frame of the animation. (We could achieve this...