11 Replies Latest reply on Aug 2, 2011 12:11 PM by unique_screenname_here

    Pixel Bender custom multiply blend and other questions

    richard7854 Level 1

      I am creating photo editing application on iPad and i am using Pixel Bender to calculate effects. But ive got a problem with multiply blend mode.When i run it in CPU/GPU mode, it runs fine(result looks absolutly 1:1 as from photoshop). But when i switch to Flash Player mode, it dont want to render properly. I dont get any compilation errors. Ive got also some other questions:

      1.How does PB performs on iOS ?

      2.If my problem is becouse of  incapability of FP, is there any other solution to this ? I cant afford AS3.0 computing, becouse it is really slow even on PC.

      3. Can be Pixel Bender 3D sollution to this ? If yes, when will it come out to iOS ?

      4. How are filters computed in FP ? CPU or GPU ?


      here, you can see the difference : http://ponozka.php5.cz/gpuMode.jpg  http://ponozka.php5.cz/flashMode.jpg




      source code :


      <languageVersion : 1.0;>


      kernel MultiplyLayer

      <   namespace : "Your Namespace";

          vendor : "Richard Molnar";

          version : 1;



          input image4 src;

          input image4 layer;

          output pixel4 dst;


          parameter float4 param <









              pixel4 pix;

              pixel4 pix2;

              pix = sampleNearest(src,outCoord());

              pix2 = sampleNearest(layer,outCoord());

              dst.r = pix.r - pix.r * (1.0-(pix2.r))*param.r*pix2.a*param.a;

              dst.g = pix.g- pix.g * (1.0-(pix2.g))*param.g*pix2.a*param.a;

              dst.b = pix.b -pix.b * (1.0-(pix2.b))*param.b*pix2.a*param.a;

              dst.a = 1.0;