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. Let us know your feedback about the Global Illumination changes in the 2023.2 beta.
    Dismiss Notice
  3. Dismiss Notice

UI looks different in Linear color space

Discussion in 'Unity 5 Pre-order Beta' started by makeshiftwings, Nov 5, 2014.

  1. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    When in Linear color space, UI with the default unlit material in default Overlay mode looks much darker in play mode than in edit mode. If I understand correctly, unlit sprites shouldn't look any different in linear vs gamma. But maybe I don't understand correctly...?

    Note: If I switch the UI to ScreenSpace - Camera instead of ScreenSpace - Overlay, it does look correct. So I'm thinking this is a bug?
     
  2. Per

    Per

    Joined:
    Jun 25, 2009
    Posts:
    460
    Does Unity gamma correction support compensation and bitmap color space? If so then that sounds like a bug and should be reported through the normal channels. If not then you need to manually compensate the gamma in the original bitmaps.
     
  3. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I've done a little more experimenting and things are definitely weird with the UI in linear mode, even in ScreenSpace - Camera mode. For example, when selecting a text color for a text label, the color you select is often quite different than the one that actually displays in the scene. If you click the eyedropper tool and click a pixel in the scene, the color it actually chooses is very different from the color you actually clicked. None of this is an issue in gamma space mode. So even if there's some kind of gamma correction on bitmaps, it shouldn't be happening on font coloring.
     
  4. djweinbaum

    djweinbaum

    Joined:
    Nov 3, 2013
    Posts:
    533
    Darker in play mode? To me things look brighter in play mode, and I'm seeing it only for atlased sprites (in linear).


    I started a thread here. Then I reported a bug showing it on a completely fresh project two weeks ago. Nobody has responded to my bug so I think you should report a bug too.
     
    makeshiftwings likes this.
  5. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I did submit a bug this morning, so hopefully someone takes a look. Here's an example of mine; scene view on the left, game view on the right. The font, as you can see, is also showing up as a light grey in both views, whereas in gamma mode, it is dark brown (what it should be) in both views.

    Capture.JPG
     
    djweinbaum likes this.
  6. djweinbaum

    djweinbaum

    Joined:
    Nov 3, 2013
    Posts:
    533
    @makeshiftwings that is so odd. And does it happen regardless if you use an atlas packing tag?
     
  7. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Yeah, sprite packing tag and messing with pretty much every other option on the sprite made no difference.
     
  8. melkior

    melkior

    Joined:
    Jul 20, 2013
    Posts:
    199
    I had the same problem and just thought I was doing something wrong! Glad you posted this.
     
  9. djweinbaum

    djweinbaum

    Joined:
    Nov 3, 2013
    Posts:
    533
  10. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I haven't had a chance to check out RC1 yet, but I never got any response from the bug report I sent; it's still sitting unread in the queue.
     
  11. melkior

    melkior

    Joined:
    Jul 20, 2013
    Posts:
    199
    I moved over to Unit 5b12 as my project calls for PBR shaders and I wanted to test those out. I don't think the RC1 candidates are merged to 5b12 .. but I am still having the issue there.
     
  12. melkior

    melkior

    Joined:
    Jul 20, 2013
    Posts:
    199
    This appears fixed in beta14 on my system, much nicer!
     
  13. djweinbaum

    djweinbaum

    Joined:
    Nov 3, 2013
    Posts:
    533
  14. peteorstrike

    peteorstrike

    Unity Technologies

    Joined:
    Oct 4, 2013
    Posts:
    116
    If the problem persists in b14, you can try setting the Sprite's Import Type settings to Bypass sRGB Sampling in the Inspector:
     
    melkior and Roni92 like this.
  15. djweinbaum

    djweinbaum

    Joined:
    Nov 3, 2013
    Posts:
    533
    @peteorstrike Awesome! That works for me. Can't believe I haven't just been doing that for the last few months. I had no idea. Thanks for mentioning that.
     
    Roni92 likes this.