Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Update to Unity 5.1 = too bright GUI

Discussion in 'Extensions & OnGUI' started by manutoo, Jun 11, 2015.

  1. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    259
    Hello,

    I just updated from Unity 5.0.1 to 5.1.0f3 and the whole GUI got way too bright !
    Whether using GUI.Box() or GUI.DrawTexture() the result is too bright. For the texture, it seems that removing the "Bypass sRGB sample" on importation (available when selecting "Advanced" texture type) fixes the issue.

    I'm using Deferred Legacy rendering, and Linear color space.

    All my GUI textures normally use "Legacy GUI" for texture type.

    Anyone else got this issue ?
     
    Last edited: Jun 11, 2015
  2. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    259
    Switching to gamma color space "fixes" the issue...
    I tried with another project, much simpler than my current project, with the same effect on texture.

    My GUI.Box() fails because it uses a texture, but it seems that everything that doesn't use a texture is correctly displayed (GUI.Button(), etc.) .

    Am I supposed to change type & then uncheck "Bypass sRGB sample" on all my GUI textures ? o_O
     
  3. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    259
    I filled a bug report => #703980 .
     
  4. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,038
    Kind of interesting. The same thing happens with NGUI if you try to use Linear color space. Not just in 5.1, but 5.0.x as well.
     
  5. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    259
    Bug is still present in 5.1.0p1 (released yesterday).
     
  6. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    587
    Same issue here, just wanted to make a report too.
    Can you share the link to the report? I can't find a way to search for IDs.

    Version is 5.1.0f3
     
  7. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    259
    Glad to know I'm not the only one in this case !

    I'm not sure if I can share the link or not, as it leads to my bug account.
    But here the exact report :
     
  8. daisyDynamics

    daisyDynamics

    Joined:
    Dec 29, 2011
    Posts:
    331
    I have the same issue, also fixed by unchecking Bypass sRGB. At least there's a temporary workaround - thanks for filing a bug report.
     
  9. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    259
    Still getting this issue with 5.1.1f1 released yesterday.
     
  10. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    259
    And when building, everything gets too dark again ; I have to set the textures back to "Legacy GUI" to make them look normal again... :confused:

    So it's a very annoying bug, and I still didn't get any answer for my bug report...
     
  11. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    259
    Still not fixed in 5.1.1p1 released yesterday... o_O
     
  12. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    587
    Just recognized that it only happens in the editor, in a build it is fine.
     
  13. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    259
  14. daisyDynamics

    daisyDynamics

    Joined:
    Dec 29, 2011
    Posts:
    331
    It's still happening in both the build and the editor in 2017.4.3 (LTS).
     
  15. fatboynotslim

    fatboynotslim

    Joined:
    Aug 19, 2013
    Posts:
    5
    Also present in 2018.3.0f2.

    Unfortunately the "bypass srgb" option is gone and has been replaced with an "sRGB" checkbox - and ticking or unticking it has no effect; the texture is still drawn too brightly in the gui. Whether as part of a button image, or using gui.drawtexture, it's too bright and no way to fix...

    Edit: Found a painful workaround.

    Use graphics.drawTexture instead. Colors will now be correct. The problem is, if you just do this during ongui, the texture will be drawn twice - once correctly, and once wierldy and hugely covering half the screen (well, that's what happened to me)

    To fix: Draw it during onGui, BUT only during the repaint event. Like this:

    public void OnGUI()
    {
    if (Event.current.type.Equals(EventType.Repaint))
    {
    Graphics.DrawTexture(new Rect(0, 0, 128, 128), aTexture);
    }
    }

    Now I get perfectly coloured, single instance textures.
     
    Last edited: Feb 11, 2019 at 3:07 AM