PDA

View Full Version : Masking a moving polygon



roadkillguy
03-29-2012, 10:57 AM
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.

tonyo_au
03-29-2012, 10:23 PM
Do you mean you want something like an S shape inside the quad?

roadkillguy
03-29-2012, 10:47 PM
No, just hide the edges where the quads make abrupt jumps.

roadkillguy
03-30-2012, 10:56 AM
I guess I kind of solved it by ensuring terrain would be on all sides of the water.

\----/