Search Unity

DeferredShading. Hook to Lighting Pass.

Discussion in 'Shaders' started by Egnech, Oct 9, 2018.

  1. Egnech

    Egnech

    Joined:
    Aug 27, 2015
    Posts:
    27
    Hello, I'm not sure where to place my question, so please correct me if this is a wrong place ;)

    I need to separate some data came after Deferred Lighting Pass to achieve an toon-like lighting in my hobby project.

    To be more persisted I need to store separately LightColor * LightAttenuation and surface shade (I think I’m calling it wrong), based on light-normal dot product.

    Initially I was trying to store surface shade as an alpha component, but then I found that Unity already using it for AO.

    I’m thinking about adding additional render target, but I did not found where to hook, and looks like it is not really possible without Scriptable Pipeline. But switching to SR is an overkill for me now.

    The other thought was to replicate all the process that Unity do internally at Lighting Pass, but once again - too complicated… I think.

    May be somebody can point me to a right direction?

    PS. Excuse my english, I’m not native ;)