Ping-pong FBOs with shaders

Hey all,

I’ve been starting to work with Shaders in the last few months, and making some very promising headway… the speed offered by moving processing to GPU, coupled with the low-level programming, makes it super ideal (IMO) for the sort of work I’m interested in making.

I’m at the point where I want to start moving some data processes to GPU using shaders (ie. particles systems, flocking algorithms, l-systems, and other systems that rely on growth and development over time).

I’ve tried to pick apart a few examples to rewrite them on my own, including @neilmendoza’s ofxGPUParticles, but I keep running into issues regarding the correct / up-to-date shader syntax (I’m running GLSL version 430), and the correct ordering of operations in oF.

Can anyone offer a stripped down example of ping-pong-ing between two FBOs with shaders?

Check out @neilmendoza’s ofxPostProcessing, which does what you’re after. One difference you may encounter is that he uses a stringify macro for the shaders, rather than having them in separate files.

ofxBlur is a simple addon that also shows ping pong off – might be useful :

awesome… thanks!