How to get even gradient repetition using modulo? I am trying to apply the modulo on a gradient to get some repetition, but the problem is that the result is different from one gradient to another because of random inputs to the modulo, as you can see here:


I want the gradient to repeat itself equally, not like this. Is there anyway to overcome this problem?
This is really simple. What you need is to, first, modulo the gradient texture by a value that is less than one and then divide by that same value:



The problem you're experiencing is due to the image's resolution. The only way to fix this is to render to a higher resolution image.

Here's the .blend: