Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Feature Request URP + ShaderGraph final color node?

Discussion in 'Universal Render Pipeline' started by funkyCoty, Mar 9, 2022.

  1. funkyCoty

    funkyCoty

    Joined:
    May 22, 2018
    Posts:
    613
    I was thinking of putting together an asset for a custom fog gradient. It's something I'm using in a personal project already, in my custom urp shader setup. But, I figured for a distributed version people would appreciate having ShaderGraph support to, so I've been digging into it.

    What I need for this to happen is something like this:
    • output -> my custom 'final color modifier' code -> final color

    upload_2022-3-8_21-53-48.png

    Is this feature available and I'm just missing it? Or did the shadergraph team drop the ball here? Seems like such an obvious and very easy to add feature.
     
    Last edited: Mar 10, 2022
    customphase and Jes28 like this.
  2. iamvideep

    iamvideep

    Joined:
    Oct 27, 2017
    Posts:
    118
    You can always write a custom pass (Scriptable render pass) and queue it after the post-process event. I doubt if they are going to add this functionality to the shader as it does not follow the graphics-pipeline...
     
  3. funkyCoty

    funkyCoty

    Joined:
    May 22, 2018
    Posts:
    613
    You misunderstand what I'm asking for. This method would avoid a post process pass. It's "post processing" the material itself, not the kind of post process you're referring to where you draw a quad over the screen with a post process shader. This requires no pipeline reworking. It literally is just "ok after the lighting pass, here's another node, do what you want with the final color"
     
  4. funkyCoty

    funkyCoty

    Joined:
    May 22, 2018
    Posts:
    613
    For an example of what I mean, read the docs on Surface Shader's "Final Color Modifier"


     
  5. svenneve

    svenneve

    Joined:
    May 14, 2013
    Posts:
    42
    You would need to rebuild the shading your self, not sure this is possible with SG.
    It is possible with Amplify though (which I would recommend over the sad joke that SG is anyday.)
     
  6. funkyCoty

    funkyCoty

    Joined:
    May 22, 2018
    Posts:
    613
    I know it's not possible right now, I'm requesting that it is supported as soon as possible. It seems like a very trivial thing to add, and it was a feature of the builtin pipeline's surface shaders.
     
    Jes28 likes this.
  7. funkyCoty

    funkyCoty

    Joined:
    May 22, 2018
    Posts:
    613
  8. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    449
    This would be awesome, but given the fact that basic features were not added in years to SG, I dought it will happen.

    Amplify has the template system and you can create a new port for final color and how to blend that with you own additional post color.
    I never tried it, but I would say it is possible and should be relatively easy to add.
     
  9. BoaNeo

    BoaNeo

    Joined:
    Feb 21, 2013
    Posts:
    51
    Was this ever added (Can't find it, so I guess not?)... Seems like a silly omission and not having it makes so many things really hard if not impossible to do. But I guess that just speaks to my pet peeve that "visual programming" sucks, because it only ever gets you half way there :) ...
     
  10. funkyCoty

    funkyCoty

    Joined:
    May 22, 2018
    Posts:
    613
    lol imagine unity giving us meaningful updates on literally anything