Reputation: 54133
I would like to for example draw shapes A, B, C then set the blender, then draw shape D and everywhere where shape D is, the scene shows my background color of (1,1,1,0). Thanks
Upvotes: 1
Views: 1145
Reputation: 9547
Much simpler than other answers :
and you're done.
Upvotes: 0
Reputation: 490398
I'm not aware of that being possible directly. There are a few possibilities to get the same effect though. The cleanest would probably be to start by filling the stencil buffer with 1's, then drawing shape D into the stencil buffer with 0's, then draw everything else (with the stencil buffer enabled, of course).
Upvotes: 4