Erase blend

This forum is currently in read-only mode.
  • From my understanding erase blend is meant to erase things on it's layer and show the things below right?

    When I try to use it it just looks all garbled.

    What am I doing wrong?

  • On the layer with the erase object you need to check "Force own texture" under layer properties. That will keep it from erasing everything.

  • nice one thanks!

    EDIT: out of interest what does this do other than make erase work? (any side effects?)

  • I think it screws arround with the other non-pixel shader effects on that layer. I know that regular Additive won't work anymore.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Well, it's an efficiency thing. When a layer has no effects or anything, it just draws directly to the screen, because it's just another bunch of objects. 'Force own texture' makes it draw to a separate, offscreen surface, and once the layer is drawn there, the whole surface is pasted on top of the screen. This is slightly slower since it has to copy the surface to the screen, but most video cards can do this sort of thing a few thousand times a second without breaking in to a sweat.

    When the layer is drawing directly to the screen, erase doesn't work because you can't cut a hole in the screen - there's nothing underneath. When the layer is drawing to its own surface, it's cutting out an area of transparency in the surface, so when it's pasted to the screen, there's a hole in the layer and whatever was beneath shows through.

    If you change the layer opacity, filter, or add layer effects, it has to draw the layer to its own surface to process the effects anyway. So you only need 'Force own texture' if you want to process an erase or mask effect, and the layer has no effects.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)