I am working on a project that loops through every pixel in an image, and performs two noise functions in each iterations of the loop. It does this every frame. As you may to able to imagine, this is quite slow.
I am looking for a way to speed this process up, so it can work more similarly to real time. One of the solutions that seems to be recommended while going through forum posts is caching the noise. But I am unsure of how exactly to go down that route. Are there any good examples of how to do something like this?
I get the general idea I think. I am able take my current noise functions and create a 2D image representation of it.
Than I read that instead of using a noise function in my project.
But the details are not clear. How do I make reading a noise image work similarly to how a noise function works?
Any examples are greatly appreciated. Or maybe caching isn’t the right route?