Update to Unity 5.1 = too bright GUI [EDIT: bug is back in 2019.1]

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 ?

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 ? :eyes:

I filled a bug report => #703980 .

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.

Bug is still present in 5.1.0p1 (released yesterday).

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

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 :

I have the same issue, also fixed by unchecking Bypass sRGB. At least there’s a temporary workaround - thanks for filing a bug report.

Still getting this issue with 5.1.1f1 released yesterday.

And when building, everything gets too dark again ; I have to set the textures back to “Legacy GUI” to make them look normal again… :face_with_spiral_eyes:

So it’s a very annoying bug, and I still didn’t get any answer for my bug report…

Still not fixed in 5.1.1p1 released yesterday… :eyes:

Just recognized that it only happens in the editor, in a build it is fine.

Someone created an issue report for this bug => Unity Issue Tracker - [OldGUI][Linear] Legacy GUI are way brighter in the Editor than in builds when using Linear Color Space

It’s still happening in both the build and the editor in 2017.4.3 (LTS).

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.

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.

2 Likes

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?!

@mowax74 & @ratking ,
the bug was fixed in Unity 5.6.

I just just updated to 2019.1.8f1 and it’s truly back ! :hushed:

Changing the texture mode to default to uncheck sRgb didn’t help.

Did you fill a bug report ?

I just filled a bug report => #1168191 .

1 Like

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.

1 Like