Hello oF People,
I’m trying to create a perforated ‘layer’ through which I’ll see a background layer.
Conceptually, it’s like this:
- Make random array of circles to use as the holes
- Subtract the circles from a plane to create the perforated plane (I was assuming I could use an alpha mask to do this) Here’s an example hole mask
- Draw this to the screen above a background image
- See background image through holes Here’s the two composited together, it’s dead easy in Photoshop
I don’t want to use a pre-made image for the alpha mask because I want to be able to vary the hole size, quantity and position.
Should I be using an FBO for the behind image and for the perforated plane? Do I need a third FBO, like this?
FBO 1: plane
FBO 2: array of circles
FBO 3: background image
Should I be using glBlend to composite them together?
I’d be grateful for any suggestions of where to go next.