Generates an animation by taking the active layer and applying a tileable, looping pattern like you might see on the bottom of a swimming pool. You can control the size of the pattern, number of frames, and blend mode of the pattern. The resulting animation is created in a new image.
The script first generates two layers with tileable solid noise, and sets the top layer to difference mode. This creates dark "bands" where the values of each layer cross. This result is normalized and has the curves filter applied to bring out the bands in white instead of black. This result is blended over the base layer (the one that was active when the script is called) with the chosen blend mode. This entire procedure is repeated for each frame, with slight offsets of the solid noise layers, so the bands are shifted slightly each time. The offsets are the size of the image divided by the number of frames, so that at the end, the solid noise layers are back where they started, and the entire animation loops seamlessly.
I have updated the script to now include the possibility of a displacement map instead of/in addition to the highlights.