(0.13.2) GUI bright & washed out on MacOS

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
mgduder
Posts: 6
Joined: Wed Jan 26, 2022 2:45 am

Re: (0.13.2) GUI bright & washed out on MacOS

Post by mgduder »

Annoyingplastic wrote: Mon Jan 31, 2022 10:57 pm
Hi mgduder, may I ask what do I need to do to fix it? Does it require Unity license to work?
It doesn’t require a unity license to do what I did, which was to just download the source open the project in unity and change the color space. I wouldn’t suggest doing this because the project is aligned with linear color space.

In addition when set to gamma the UI is the right color but it messes up all the in game font.
Interkarma wrote: Tue Feb 01, 2022 9:05 pm Hey. :)

Daggerfall Unity uses linear colour space as of 0.13. The internal asset pipeline, shaders, and mods all have to be aligned with this.

The problem with UI being so washed out looks to be a Unity engine bug on Mac. It looks very similar to this post on Unity forums in 2018.

This is possibly resolved in a later engine version. As you seem confident with setting up Unity editor, cloning source, making changes etc. maybe you could try a few things for me? Are you able to try building with Unity 2020.3.27f1 (most recent LTS build) using a fresh clone of project and see if problem persists on a newer engine version?
Absolutely, I’ll give it a shot when I get home tonight. Im happy to help any way I can.

mgduder
Posts: 6
Joined: Wed Jan 26, 2022 2:45 am

Re: (0.13.2) GUI bright & washed out on MacOS

Post by mgduder »

I built and ran with 2020.3.27f1 and the issue persists. Drat.

User avatar
Interkarma
Posts: 7244
Joined: Sun Mar 22, 2015 1:51 am

Re: (0.13.2) GUI bright & washed out on MacOS

Post by Interkarma »

Thanks for checking. :) I don't think an engine update will help then. We can revert back to 2019.4.28f1 if you still have that available.

Something else we can try is tweaking how UI textures are created. If you're still up for another test, please open ImageReader.cs and find line 59 - it should look like below:

Code: Select all

Texture2D texture = new Texture2D(srcWidth, srcHeight, TextureFormat.ARGB32, false);
Now change that line so it looks like below, save and run game again from editor.

Code: Select all

Texture2D texture = new Texture2D(srcWidth, srcHeight, TextureFormat.ARGB32, false, linear:false);
This change tells Unity to specifically not create UI textures as linear. This should already be the case, but maybe the runtime is working differently on Mac for some reason.

This won't fix all textures, it's just a proof of concept, but it if helps you should see most UI textures go back to normal.

mgduder
Posts: 6
Joined: Wed Jan 26, 2022 2:45 am

Re: (0.13.2) GUI bright & washed out on MacOS

Post by mgduder »

Hey,

Went ahead and tried that and to no avail.
Screen Shot 2022-02-02 at 11.26.35 PM.png
Screen Shot 2022-02-02 at 11.26.35 PM.png (962.58 KiB) Viewed 1156 times
I am happy to keep trying things as they come to mind!

User avatar
Interkarma
Posts: 7244
Joined: Sun Mar 22, 2015 1:51 am

Re: (0.13.2) GUI bright & washed out on MacOS

Post by Interkarma »

Thank you. :) I'm definitely considering this a Unity bug around gamma correction on Mac. Not sure what the solution will be here (or if there even is one).

I'll try to think of another approach and add it here if I can. Hopefully someone else comes along that might have dealt with this before and can offer help.

Thanks again for your help!

User avatar
Interkarma
Posts: 7244
Joined: Sun Mar 22, 2015 1:51 am

Re: (0.13.2) GUI bright & washed out on MacOS

Post by Interkarma »

An update on this one. Fixes have been merged and will be available from 0.14.1 preview.

mgduder
Posts: 6
Joined: Wed Jan 26, 2022 2:45 am

Re: (0.13.2) GUI bright & washed out on MacOS

Post by mgduder »

Awesome!!!

Post Reply