Is it possible to have an "overlay" blend mode effect like in Photoshop?

Hi,

I’d like to have a sprite “overlay” the scene behind it, like a Photoshop layer would do when set to blend mode “Overlay”. So far I found various blend-modes shaders, and even bought an asset claiming to do just that, but in reality all of them only support blending specified sprites or textures on top of each other. That’s not what I am looking for, unfortunately! I’d like to have a sprite blend with everything behind it.

I’ve read there was an official Unity Overlay screen effect? But as far as I know screen effects are depricated nowadays, right? Is there anything to replace them?

Do you have any other ideas?

This is doable, but it’s costly, so it probably not something you’d want to do many sprites with…

As you can see from this reference http://www.deepskycolors.com/archive/2010/04/21/formulas-for-Photoshop-blending-modes.html, overlay requires branching logic based on brightness of the target.

Unfortunately, when rendering one thing onto another, a shader can do whatever math you want on the source art(s), then only use simple (±×÷) math against the target (background) color.

So to pull off the branching logic, you’ll need a shader that gets source and target as inputs (sources). This can be done by rendering the scene to a render texture, and feeding that into a shader with you actual source. It’s a bit of an advanced tech move, but for more info, look into custom post processing effects.

-gdb