Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Shader Graph Gradient Node has a very sharp falloff.

Discussion in '2021.2 Beta' started by fogsight, Jun 6, 2021.

  1. fogsight

    fogsight

    Joined:
    Apr 6, 2010
    Posts:
    65
    Gradient node in Shader Graph has a very sharp falloff. Switching from Gamma to Linear didn't affect anything.
    Exposed gradient in the inspector shows regular much smoother falloff as normal, it affects just the node it seems.
    The same in 2021.2.0a19 and 2021.2.0a17 (It was fine in 2020.2)

    Unity_2021-06-06_21-42-19.png
     
    apkdev likes this.
  2. fogsight

    fogsight

    Joined:
    Apr 6, 2010
    Posts:
    65
    Using Lerp does the same thing. And it also reflects in the material. Unity_2021-06-06_22-25-45.png

    For comparison inspector gradient (same alpha):
    Unity_2021-06-06_22-31-30.png
     
  3. print_helloworld

    print_helloworld

    Joined:
    Nov 14, 2016
    Posts:
    231
    Interesting how the shader graph gradient looks like its in linear color space while the inspector one is in gamma colour space. You can try using pow(x, 1/2.2) to convert t into gamma space when evaluating the gradient in the graph.
     
  4. fogsight

    fogsight

    Joined:
    Apr 6, 2010
    Posts:
    65
    Thanks, I'll try that!
    Same thing happening with color picker inside Shader Graph as well, btw. It looks off, like it is in linear space too. That's not the desired result isn't it?