Currently Being Moderated
Feb 19, 2009 4:26 PM
I've been experimenting with Pixel Bender lately and came
accross the following issues :
- Only one shader can be executed at a time, when more than
one ShaderJob is started, they are automatically queued, however
this does not seem to be the case and I had to create an AS3 class
which queues the ShaderJobs instead.
- All ShaderJobs that I start are supposedly asynchronous,
and should not slow down the runtime/code execution, but in my
tests they did slow down the player significantly, maybe I'm
missing something in my code?
Here's the rather default way I've implemented it :
shaderJob.addEventListener(ShaderEvent.COMPLETE,
onShaderJobComplete);
shaderJob.start(false);
and in the onShaderJobComplete function, I simply start the
next ShaderJob in my queue
When continuously firing up ShaderJobs, my framerate plummets
to 6 or 7, going to 30 when the queue is empty.
Thanks for your help