---
Magic 1.5's GLSLShader module introduces some powerful new functionality that makes it really easy to achieve cool effects.
Here's a new Alpha Mask shader I wrote pretty quickly:
Code: Select all
void main()
{
vec2 pixelLocation = gl_FragCoord.xy / iResolution.xy;
gl_FragColor = texture2D(iChannel0, pixelLocation) * texture2D(iChannel1, pixelLocation);
}
To use this shader in your own projects, click here to download it: Then just load it into the GLSLShader module, as shown here:

The two inputs to the GLSLShader module (the Image module and the Video module) are multiplied together, resulting in the alpha mask effect. (I put the Starfield in the background just so you can see where the video has become transparent.)
Note that circle.png and shortCars.avi are both in the Magic sample projects folder, so you should be able to duplicate the scene exactly. Or, try it out with different inputs to the GLSLShader module and I'm sure you'll have a lot of fun playing around with it.
Any questions, please let me know!

Eric