Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Feedback [Bug] Exposing gradient is changing shader pink

Discussion in 'Shader Graph' started by URocks, Oct 2, 2019.

  1. URocks

    URocks

    Joined:
    May 1, 2014
    Posts:
    132
    I am using universal render pipeline with shader graph 7.1.2, and I saw some gradient bugs were already fixed, but what is not fixes is when I want to expose gradient to be visible in editor and when I add default one with some color, I get errors and my shader turns pink.

    Exposing gradient but not assigning default one, make my shader to compile without error but I don't see gradient inside editor anyway so I can't change it...
     
  2. LandonTownsend

    LandonTownsend

    Unity Technologies

    Joined:
    Aug 21, 2019
    Posts:
    32
    Right now, gradient properties have no way to be exposed for a material; the purpose of a gradient property in shadergraph is so that you can use the same gradient multiple times and change it in the blackboard when you need to change all instances of the gradient.

    I couldn't reproduce the bug with the shader failing to compile, would you mind posting the shadergraph file or a screenshot of the shadergraph, along with any errors that print to the console?
     
  3. URocks

    URocks

    Joined:
    May 1, 2014
    Posts:
    132
    Just add new gradient to blackboard, inside default value create new gradient with at least 3 hadles(3 colors), save the shader, you will get error
     
  4. LandonTownsend

    LandonTownsend

    Unity Technologies

    Joined:
    Aug 21, 2019
    Posts:
    32
    upload_2019-10-2_11-12-1.png
    It might be the version of Unity, what version are you using? I have attempted to reproduce this in version 2019.3.0b4, no luck so far. I've tried 3 and 5 handles and I've tried plugging it into both a PBR master node and Unlit master node.
     
  5. URocks

    URocks

    Joined:
    May 1, 2014
    Posts:
    132
    I am using 2019.3.0b5 on windows
     
  6. URocks

    URocks

    Joined:
    May 1, 2014
    Posts:
    132
    And I think it might have something to do with this:

    From shader graph Changelog:
    [7.0.1] - 2019-07-25
    Fixed an error that previously occurred when you used the Gradient Sample node and your system locale uses commas instead of periods.


    Because before this fix I had same problems of gradient even inside shader graph not only in blackboard, but now it is just blackboard
     
  7. LandonTownsend

    LandonTownsend

    Unity Technologies

    Joined:
    Aug 21, 2019
    Posts:
    32
    I've reproduced the bug, I'm reopening the bug case. It was indeed caused by Windows locales, like you suggested.
     
    URocks likes this.
  8. URocks

    URocks

    Joined:
    May 1, 2014
    Posts:
    132
    Thanks a lot!
     
unityunity