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.
  2. Dismiss Notice

Question URP Lit Master and Lightmapping (Baked GI Node)

Discussion in 'Shader Graph' started by Gabestronaut, Sep 28, 2020.

  1. Gabestronaut

    Gabestronaut

    Joined:
    Oct 21, 2013
    Posts:
    5
    So I have a basic custom shadergraph shader.
    Essentially the problem is when I bake lightmaps, anything using this shader is pure black.
    So it seems that the bakes do not pick up ambient GI with shadergraph.

    I ended up finding a fix but I am not sure if this is the proper solution or not.
    I found the baked GI node and have no idea how to use it so I took a guess and multiplied the albedo with baked GI output and plugged it into emission.

    This appears to give me the exact results I hoped for, however, I do not know if this is lucky and absolutely incorrect or the appropriate approach for now. Any help will be great. Thanks! BakedGi.PNG
     
  2. LegacySystem

    LegacySystem

    Joined:
    Jan 28, 2021
    Posts:
    52
    Hi, I am having the exact same issue. How did you fixed it ? What did you do with the node? When using URP/Lit the colors are correct but when I use shader graph without nothing on it. And it is pitch black
     
  3. Gabestronaut

    Gabestronaut

    Joined:
    Oct 21, 2013
    Posts:
    5
    I placed an ambient GI node and a multiply node. I plugged ambient gi node into the multiply node. I also plugged the albedo into the multiply node.
    I then finally took the multiply node and placed it into emission.
    Hopefully that helps!
     
    AllMightyNico likes this.
  4. LegacySystem

    LegacySystem

    Joined:
    Jan 28, 2021
    Posts:
    52
    Thank you very much. It's a shame there is no such warning on any of the documentations
     
    AllMightyNico likes this.