Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question My sprites aren't working properly with the ambient light

Discussion in 'General Graphics' started by PaperMouseGames, Aug 15, 2022.

  1. PaperMouseGames

    PaperMouseGames

    Joined:
    Jul 31, 2018
    Posts:
    434
    Hello there! I've been messing around with the ambient light in my scenes and I've noticed that my sprites are just not doing exactly what I wanted.

    Some context:
    • I'm changing the
      RenderSettings.ambientLight
      with colors.
    • The colors I'm using are HDR colors
    • I have a custom sprite shader for the billboard sprites in my scene

    If I use bright/white lights everything is fine:
    Shader Bright Ambeint Light Issue.png

    But when I change the light to be dark I get this:

    Shader Dark Ambeint Light Issue.png

    The sprites in my scene as well as a couple of textures are all greyed out instead of getting really black like the rest of the things. I assume this has something to do with my custom shaders that I'm using for those sprites, but I'm not an expert when it comes to shaders and lighting so I'm wondering if anyone would have some tips about how to fix this.

    One thing of note, is that the treasure chest shown in the image is a 3D model, not using my sprite shader, and the metallic part of it also seems to be having the same issue (same with the ramp in the background), so maybe it's a metallic setting doing this?

    If anyone has any clue about where I can start trying to fix this I would greatly appreciate it :)