Blend MOdes

0 favourites
  • 5 posts
  • A very simple question! Do blend modes set on object works on objects on different layers. Eg will source out work on an object that is one layer below the current acting objects layer?


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It depends on if the layer is drawing off-screen or not. By default everything just draws directly to the screen. This means all effects and blend modes work as if everything was on the same layer (so you can blend across layers).

    However if the layer has 'Force own texture' enabled, OR it uses layer effects or a layer blend mode, OR its opacity is not 100, the layer will draw to its own off-screen surface. This means objects on the layer can't blend with any other objects from other layers. However as long as you don't use any of those things, objects should blend between layers just fine.

  • Thanks Ashley That has helped alot. But I'm not sure what you mean by on-screen off-screen in this context. You don't mean literally outside the project window do you? If there is a link to what this means ill just follow it. Cheers

  • *off screen surface

  • Hi Jubalicious,

    I had some similar questions about layers and blend modes so did some research (and found this post as well). When Ashley says that it's rendered to its own off-screen surface, he means that memory is reserved to hold another full screen image. The off-screen surface can't be seen, and it's not hiding off the edge of the screen or anything. It's used as a scratchpad and you will never actually see what's drawn to that memory, but instead, after we've drawn to the off-screen surface, then we draw the image from the off-screen surface to the screen.

    If you're interested in the technical details, you can check the Javascript file "layout.js" functions "Layer.prototype.draw" and "Layer.prototype.drawGL". Draw creates a new HTML5 Canvas in memory (but it's never added to the webpage), and DrawGL makes a WebGL Texture object.

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