I'm trying to run a spherizer on each frame in Flash. This is ok if the target region is pretty small, but as soon as I increase the radius I start getting a rapid fps drop off.
I assumed using Pixel Bender would give me the juice to run this kind of routine with little overhead.
I'm a n00b to PB so could be doing a fairly obvious #FAIL - but don't think so.
I'm prototyping an idea that will allow me to view a sphere and then zoom in on it (using deep zoom technology). PB and a Spherizer would be a quick win (in terms of dev time) here but with such a dramatic frame rate roll off I'm now not so sure.
I'm guessing that the drop in performance is because I'm running the spherizing process on ever increasing numbers of pixels.
Would you recommend I carry on down this path of investigation, maybe looking at using regions for limiting processing? or do you think calcing two square roots per pixel is just too much to run per frame?
The thing with Pixel Bender is that although it's fast, it still doesn't change the fundamental complexity of your algorithm. If your runtime is O(radius^2) (which is what I'm guessing yours is), that won't change and it'll still slow down as you increase the radius.
Can you post any of your code? I can have a look and see if there's anything obviously inefficient.