Is there a way to tile a texture procedurally?

You can do it in the material editor, no c++ needed.

I came up with this:

This will offset each row by some amount depending on the division denominator (5 in this case).