Skip navigation
FrankPepermans
Currently Being Moderated

ShaderJob issues

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
  • Currently Being Moderated
    Community Member
    Apr 9, 2009 12:18 PM

    After playing with the ShaderJob class, I too think that it should support restarting.

     

    A job instance has to be created every time when shader parameters change which is not good for animations.

     

    ShaderFilter seems to give smoother results.

    |
    Mark as:
  • Currently Being Moderated
    Community Member
    Apr 12, 2009 4:00 AM

    I also couldn't queue Shaderjobs, each time I executed a new job it tramples the Shader parameters of old jobs so only the last job was executed properly. I ended up with a AS queue function...

    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points