Search Unity

Question Color-Light Banding with URP and 2D Lights

Discussion in 'Universal Render Pipeline' started by AlexTemina, May 19, 2023.

  1. AlexTemina

    AlexTemina

    Joined:
    Feb 19, 2014
    Posts:
    44
    Hi, I'm getting an annoying color banding with any 2D light. It happened to me in my previous project, but I want to see if I'm able to solve it before going to my next project.

    I am not sure if it's light related or something else, because it happened to me also with a fog texture in the past.

    I just want to know if there is something I'm doing wrong, or this is just something I have to live with.

    upload_2023-5-19_20-20-19.png

    I will upload the sample project also.

    Thanks a lot for your help!
     

    Attached Files:

  2. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,511
    The 2D Point/Spot Light does that. The easiest solution is to use a 2D Sprite Light with the qualities you want. It doesn't solve the problem completely but you can add dithering to the texture.
     
  3. AlexTemina

    AlexTemina

    Joined:
    Feb 19, 2014
    Posts:
    44
  4. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,511
    Yeah, I see. It's not too problematic there, but if you're looking for it it'll be bothersome. To the extent it can be solved (not completely), the core of the problem is too little dithering or noise. You may also want to try higher resolution textures and ensure the brushes you use to generate them aren't themselves introducing banding. Blur if so. Then add dithering / noise to try to remove banding further. Playing with different colors can help too but for many cases there's only so much you can do there.

    The talk over here details how an extreme case (black-white gradients only) was fixed, starts at 17 minutes in. Not specifically relevant to your case, but it should give you more technical background if you're interested.

     
  5. AlexTemina

    AlexTemina

    Joined:
    Feb 19, 2014
    Posts:
    44
    Very nice, thank you!