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.
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.
I also see the button textures way to bright in linear workflow. Some elements are gamma corrected from Unity, some not. Must be a bug, there is no working checkmark on the sprite to set it correctly.
It’s ridiculously stupid from Unity, that such a major bug is not getting fixed in kind of 5 years or even longer.
What’s the purpose of having the GUI-textures gamma corrected in linear workflow? Linear workflow is to get correct lighting when rendering. But since the GUI images are unlit no gamma correction is needed.
People want to see the GUI images exactly like it is displayed in Photoshop. No fix, no tweak, no workaround.
Have found a custom UI shader anyway, where you can set if the sprite image gamma should be corrected or not. But this should work out of the box, not via custom fix shader.
I updated a project from 2018.2 to 2018.4 and got the same problem. A lot of my legacy GUI buttons and panels are much too bright now. Unity, what is happening here?!
Thanks for filling the bug report. We will see if this thing gets fixed.
This bug was (re)introduced in Unity 2018.3. I could not imagine that unity stuff is not aware of it, since it’s so obvious.
We updated half a year ago from 2018.2 to 2018.3 and the first thing we realized when pressing the play button was this bug. Hard to believe that unity is not aware of this.