Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Image editor layer blend modes in SRP

Discussion in 'General Graphics' started by Gekigengar, Sep 25, 2019.

  1. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Hello, I am unable to find a good way to implement blend modes for a Photoshop-like layer & brush shader.

    The easiest way would be using Grab Pass, and then blend everything behind that layer with the blend mode.

    Unfortunately, layers are transparent. Thus using Scene Color node to blend the layer content with all the previous layer contents will not work properly. (Because Scene Color only renders Opaque objects)

    With the lack of Grab Pass feature in SRP, and after researching a lot into this, I am stuck.
    From Unity's responses, they won't be bringing the Grab Pass feature to the SRP. None of the solutions I've found supports blending multiple transparent layers properly behind it.

    Any experienced users that can offer me a solution to this?
    Is there anything I can do with the SRP to make this work? Sorting magic? Custom render pass trickery?

    Thank you.
     
    Last edited: Sep 26, 2019