Masking a moving polygon

To give the illusion of a river-ish thing, I’m rendering a whole bunch of quads, and they’re all moving --well, they have the illusion of moving. I’m resetting their x position every time they pass the size of one quad. This looks great, except at the edges where the reset is visibly noticeable. I’m curious as to how one might go about hiding the edge without rendering “walls” the same color as the background. Is it possible to mask it somehow? Unfortunately, moving the texture coordinates isn’t an option as I’m using a spritesheet and wrapping the texture will show all the other tiles.

Do you mean you want something like an S shape inside the quad?

No, just hide the edges where the quads make abrupt jumps.

I guess I kind of solved it by ensuring terrain would be on all sides of the water.