Edgblend help

    Apr 19 2010 | 10:16 pm
    Hi. I'm trying to use a video-plane in such a way that it has the option to be transparent in some areas. I want to be able to overlay one plane on another and being able to do some opperations which leaves parts of the video-plane transparent. I'v manage to do this, but I also want to be able to edge blend the the video-plane, but this does not seem to work. The point is that i do not want to blend two videos in one plane, but the videoplane's them selfs. Point me in the right direction?

    • Apr 19 2010 | 11:57 pm
      the problem is that the edgeblend shader creates it's own alpha channel, overwriting any existing alpha channel. a simple solution could be to multiply the alpha channels of both the alphaglue and edgeblend.
      a better solution would be to modify the shaders to include the multiply in the actual shader code.
      also, make sure you have @depth_enable 0 on any geometry that you want to have transparency blending (ie your videoplanes).
    • Apr 20 2010 | 6:21 am
      Thank you. I'll look into this. This was very helpful.
    • Apr 20 2010 | 11:13 am
      I'v been looking at the tutorial for writing Shaders but I was wondering, do you mean that I shoud make a shader witch includes the edgeblend and the multilpy?
    • Apr 20 2010 | 6:38 pm
      You can add the following line to the edgeblend shader to preserve your alpha channel:
      wiped.a *= a.a;
      This should go directly before the line that starts with gl_FragColor...
      Altering existing shaders is a great way to get oriented with writing your own. Most of the ones included with Jitter are pretty simple.
    • Apr 21 2010 | 7:44 am
      I have been looking at the different shaders and the tutorial "your very first shader", I think this is really interesting . Thanks for all the help. :)