[SOLVED] Ping-pong texture buffer

Basically I want to run a shader using a texture in the first frame and then use the output of this shader as the input texture in the next frame, or in other words I want to feed the output of a shader back to itself.

The problem is … I’m stuck at the concept. Is anyone willing to share some code or explain how it should be done in Panda3D terminology?

Just create two buffers with the same settings in Panda. Call setActive(True) on one and setActive(False) on the other, and flip this around every frame.

You also bind a different texture to each buffer. You bind one texture as shader input to the scene graph rendering the opposing buffer, and vice versa.

That’s what I did, but it didn’t work, both buffers ended up black… I knew I was missing something, but it took me a while to figure it out - turns out the task I made for flipping the buffers run too soon, I had to give it a high sort value and I think it works now as intended.