BlenMode.ERASE not working

Hello, I try to use BlenMode.ERASE but it’s not working

var sprite:Sprite = new Sprite();;, 0, 100, 100);;
sprite.blendMode = BlendMode.LAYER;

var shape:Shape = new Shape();;, 10, 80, 80);;
sprite.addChild( shape );
shape.blendMode = BlendMode.ERASE;


I don’t think we can do this in GL, or even canvas, I think.

We should have a way to get better documentation on what’s implemented, and what’s a polyfill :frowning:

How to use BlendMode.ERASE ?

Can you use a scrollRect or mask to achieve a similar effect?

I need to use an inverted mask, for this it’s necessary to use BlendMode.ERASE, a year ago it working on html ?

I’m not aware of that, but perhaps it would be possible to implement (internally) by rendering as a mask instead

Hi. Is it possible to invert a mask/use a mask inverted without writing a custom shader or hacking the framework?

Perhaps there may be a way to make BlendMode.ERASE trigger one – this would require work internally to OpenFL, but could make a good pull request

I installed Starling/OpenFL for BlendMode.ERASE (Lemmings digging into the ground). Wanted to try it anyways.

But maybe it really should be possible in OpenFL alone too. :wink: