Currently I'm working on interacting effects. I want to use 4 render targets to simulate water ripple effects. These render targets represent for water surface height at current frame, previous frame, next frame and for temporary use respectively. And I want to simulate the effect following 4 steps:
1. Draw current frame texture to temp texture.
2. Draw additional height caused by ripple source to temp texture.
3. Take temp texture as source, calculate ripple spread in one frame and draw to the next frame texture.
4. Simply copy current frame texture to previous, and next to current.
Finally I can use the next frame texture to calculate water normal etc.
So is there any good method to make it? As far as I know, I can use viewports to achieve it, but I don't know the order they are drawn. Is it possible to draw a render target in code? May be something like drawtotexture(texture, node).