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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

No indirect lightmap colors for URP in custom shader

Discussion in 'Editor & General Support' started by Rispat-Momit, Feb 2, 2020.

  1. Rispat-Momit

    Rispat-Momit

    Joined:
    Feb 14, 2013
    Posts:
    261
    Hi there! I wonder if I am the only one having this issue. The build-in URP shaders are working properly regarding the lightmaps but the custom URP shaders with the shader graph are not responding either for emission or their indirect lights (colors).

    Here you can see the differences:

    Build-in URP Lit shader:



    Custom shaders graph URP shader:
     
  2. jacknero

    jacknero

    Joined:
    Aug 15, 2018
    Posts:
    59
    Try to increase the indirect multiplier to the same as intensity.
    Then see if it can achieve the same result as built-in.
     
  3. Rispat-Momit

    Rispat-Momit

    Joined:
    Feb 14, 2013
    Posts:
    261
    You mean on the directional light? Those two models have same lighting settings. The indirect multiplier is actually a bit higher than intensity in both cases
     
  4. jacknero

    jacknero

    Joined:
    Aug 15, 2018
    Posts:
    59
    I also met this issue.Somehow it's gone after kind of tweaks unconsciously.
    Now.I'm suffering this problem again in another scene.
    It seems area light can be baked, but spot light dosen't contribute any indirect light.
     
  5. jacknero

    jacknero

    Joined:
    Aug 15, 2018
    Posts:
    59
    I found that actually lights are baked but can't be display normally.
    QQ截图20200208181430.png QQ截图20200208181459.png
    QQ截图20200208181829.png
     
    Rispat-Momit likes this.
  6. jacknero

    jacknero

    Joined:
    Aug 15, 2018
    Posts:
    59
    Increased Intensity and indirect Multiplier from 8,1 to 12,12.The hall is finally lighted a little.
    upload_2020-2-8_18-32-50.png
     
    Rispat-Momit likes this.
  7. Rispat-Momit

    Rispat-Momit

    Joined:
    Feb 14, 2013
    Posts:
    261
    Thanks for the info! I will check it :) I know emission doesn't work too! Every time I have to bake it with a build-in shader and then replace it with a custom one in order to get it working :/
     
  8. yashwanthd1998

    yashwanthd1998

    Joined:
    Sep 17, 2019
    Posts:
    7
    emission is not working in lwrp ..upgraded to new urp also not working..damn..solution?
     
    Rispat-Momit likes this.
  9. Rispat-Momit

    Rispat-Momit

    Joined:
    Feb 14, 2013
    Posts:
    261
    The problem I had here is that I set the model to generate loghtmap UVs. When I unchecked that it worked fine. The emission issue is still there :/
     
  10. PattiBriggs

    PattiBriggs

    Joined:
    Mar 12, 2020
    Posts:
    1

    Very good explanation. Thanks for your article
     
    Rispat-Momit likes this.
  11. leimiles

    leimiles

    Joined:
    Oct 30, 2018
    Posts:
    4
    Hi, Rispat-Momit, it seems i just got the same problem as you descriped, I wonder if you have solution now, please let me know ,thanks.
     
    Rispat-Momit likes this.
  12. Rispat-Momit

    Rispat-Momit

    Joined:
    Feb 14, 2013
    Posts:
    261
    The only solution I found was to apply basic UVs to my models and uncheck the generate lightmap UVs in Unity. Hope this will help you :)