Alpha compositing with OpenGL

    Jun 14 2006 | 11:26 pm
    I have a patch reading movies without alpha channel and sending them to a series of objects (kind of mixing). At the end of this process, I would like to be able to fade in and fade out a predefined png image with alpha channel (kind of a mask) over the resulting movies, then sending the result (masked movies) to again some objects. I cannot find what to use to compose my alpha-enabled image over my mixed movies. Is there someone who could give me some clue ?
    [Movie] -+- [Movie 2] | | +--- [fade in/fade out an alpha mask] | | .....

    • Jun 15 2006 | 12:16 am
      Hi Laurent, You may need to write a simple shader that does alphablending (if we don't already have one included). the function would look something like:
      gl_FragColor = mix(source1,source2,source1.a);
      FWIW, the next version of Jitter will include some more shaders for doing this sort of thing.
      cheers, Andrew B.