
More Wobbly Waves
Sometimes the effect you want means that you want your values to change in a less predictable pattern than your standard sine wave. I have found this to be true a lot. The standard sine wave is very static in the way it pulses.
Now I’m going to tell you again to not freak out, because it’s gonna look a little complex, but really all we are going to do is multiplication.
We can achieve less predictable wave patterns in a number of ways, but my favourite way is to simply multiply one sine wave by another sine wave which has different values.
The key to making this work is making sure that your sine waves have different timings. This may sounds intimidating but it is really easy! In order to change your sine wave’s timing, all you have to do is to multiply the time node by a constant before it goes into your sine node. The higher the number, the faster the wave.
If we go back to our equation of y = sin(t), ‘t’ being time, multiplying our time just means we put a number next to the ‘t’. To make your wave travel at double speed you would multiply time by 2, and the equation would read y = sin(2t).

Here are the two waves on the same graph.
You can see that both waves reach the same peaks and valleys, the only different is that one is more spread out and one is closer together.
Now get ready because magic is about to happen.
If we multiply these two waves together it looks like this:

y = sin(t) x sin(2t)
Now what if we make one wave 5 times as fast? It looks like this:

y = sin(t) x sin(5t)
What if we use THREE waves?! It looks like this:

y = sin(t) x sin(3t) x sin(10t)

This is what the last wave variation looks like in real-time. The version I used here I slowed down by about a third (because 10x time is pretty fast) so I used 0.3t, t, and 3t as my time multipliers.
These kinds of cool patterns are really good for flags and water and other things influenced by forces of nature.
Hopefully by now you can see that this is really simple to do!
You already have one complete sine wave set up in your shader – now all you have to do is copy and paste and change the values!
You can use any combination of waves and values in order to get just the right kind of effect for your shader.