Skip navigation
Home/Support/

Forums

1307 Views 3 Replies Latest reply: Apr 12, 2009 4:00 AM by Max Penson RSS
FrankPepermans Calculating status... 7 posts since
Feb 19, 2009
Currently Being Moderated

Feb 19, 2009 4:26 PM

ShaderJob issues

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
  • Calculating status... 3 posts since
    Aug 3, 2008
    Currently Being Moderated
    2. Apr 9, 2009 12:18 PM (in response to FrankPepermans)
    Re: ShaderJob issues

    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.

  • Max Penson User 18 posts since
    Apr 12, 2009
    Currently Being Moderated
    3. Apr 12, 2009 4:00 AM (in response to FrankPepermans)
    Re: ShaderJob issues

    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...

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

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