Hey
I have drawn something on a background (like a big blue square).
I want an effect like a circle following the mouse pointer to act like a “spotlight” or mask, in that only the area of the square currently within the circle radius is visible.
I tried drawing the square with alpha = 0, then additive blending or whatever (various incantations of glBlendFunc) but could not get the effect I wanted.
I saw the ofxAlphaMask addon which is cool, but it seems a bit complex or overkill for what I am trying to do. Im not 100% on the terminology, but I basically want to define a region with alpha 100% and everything gets drawn that falls in that region, then anywhere outside that region does not show up.
How should one go about this? Is ofxAlphaMask the way to go? The difference as I see it, is it uses and alpha mask to merge two images, where as I want an alpha mask to merge my drawing and the background, if that makes sense.
Cheers