Can layers with different blend modes interact?

0 favourites
  • 3 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • Can two layers with different blend modes be made to interact in a similar fashion to two objects on the same layer? E.g. Layer 1 = "Normal", Layer 2 = "Source atop" --> objects on layer 2 interact with objects on layer 1 according to their respective blend modes.

    Premise:

    Imagine a scrolling top-down shooter game set in space. Sometimes there are large objects in the background, like asteroids, space stations, etc. When foreground objects like spaceships fly over said background objects, they cast a shadow on the surface below. However, they don't cast a shadow when they're flying over the void of space.

    I can simulate this easily enough if I place the shadow objects on the same layer as the background objects, and give them "source atop" blend mode. But there's a catch - the shadows, as you might assume, are translucent, and when two or more shadows overlap they create darker spots which look weird. Normally my solution to this would be to make the shadows opaque and then put them all on one layer, then adjust the opacity of the layer itself. So therein lies the problem, I either have all my shadows on one transparent layer (i.e. shadows don't overlap, but can't use blend modes) or have the shadows on the same layer as the background objects (i.e. shadows overlap, but can use blend modes).

    Of course, if there's a different solution to the problem I'm all ears.

  • I'm guessing no solution? Darn it I was hoping someone knew some trick

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could use the paster object to draw the objects to, and then you could in turn give the paster objects blend modes to combine them.

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