Effecient way to clone renderTargetTexture

Hi there, I was trying to use the rtt’s render result last frame as the input of this frame and this is what I’ve archived.

I met webGL error GL_INVALID_OPERATION: Feedback loop formed between Framebuffer and active Texture. and I solved it by cloning the rtt with dynamicTexture and use dynamicTexture as input. However fps drops a lot with dynamictexture, so I’m wondering is there any effecient way to clone rtt?

cc @Evgeni_Popov

You trying to do something like this?


@Pryme8 gave the answer, you must ping-pong between two textures. One is used for reading and the other for writing at frame X, then their role is exchanged at frame X+1, and so on.


That is what I want to archive, I think I’ve went through the playground but missed it, thanks!