Search Unity

Overlay blending mode on sprites

Discussion in 'General Graphics' started by Scoppex, Dec 5, 2021.

  1. Scoppex

    Scoppex

    Joined:
    Apr 13, 2021
    Posts:
    9
    Hello,
    I would like to make overlay blending mode like from photoshop on sprites rendering. I can add material from mobile>particles>addtive but I cannot find overlay option. How can I make it?
     
  2. Torbach78

    Torbach78

    Joined:
    Aug 10, 2013
    Posts:
    296
    you have to create that shader to make an overlay material
    and depends on the option, not all blend modes can be re-created on the blend mode logic

    overlay is the math of screen & multiply where the operation is different between 0 and .5
    https://forum.unity.com/threads/overlay-blend-mode-with-shader-graph.1015405/

    screen is IIRC : 1 - (1-source) * (1- destination)
    so that would be the inverse of Blend OneMinusSrcColor OneMinusDstColor... (i think)

    Screen is also not available in a blend mode, though Soft additive i think might be identical
    Blend One OneMinusSrcColor
    or
    Blend OneMinusDstColor One

    https://forum.unity.com/threads/dif...e-add-screen-overlay-changing-hue-tint.62507/


    the asset store does have a pack available though so you can grab this very versatile tool if you want something fast
    https://assetstore.unity.com/packages/tools/particles-effects/blend-modes-28238
     
    Last edited: Dec 5, 2021
    Scoppex likes this.
  3. Scoppex

    Scoppex

    Joined:
    Apr 13, 2021
    Posts:
    9
    Thank you so much, I have used that code howhever is different than Photoshop Overlay effect.
    Thats strange Unity don't have blending modes as a standard assets x_X.
    I need only overlay effect so paying $50 for that asset is too expensive for me for now.
     
  4. Torbach78

    Torbach78

    Joined:
    Aug 10, 2013
    Posts:
    296
  5. syu15

    syu15

    Joined:
    Feb 1, 2021
    Posts:
    4
    If anyone comes to this old thread looking to set up a sprite overlay blend in shader graph, this is what I've come up with (using the URP Sprite Lit Shader Graph as a base). Might not be exactly what you're looking for but it is simple enough to extend/modify. The blend node itself has a bunch of other modes in the dropdown that you can also experiment with. OverlayShaderGraph.png
     
    MiDoGaMer104 and spider853 like this.