I’m trying to understand why images imported into Unity and displayed with an Unlit Shader consistently look different than the same images opened anywhere else - Photoshop, Windows Photo Viewer, etc.
As a bit of background: we’re preparing for a show where a client is going to be doing some AB testing: users are going to select between two versions of a face based on which they find more attractive. Obviously, for something like this it’s important that images look exactly like the source imagery sent by the client.
However, as you can see below, pulling an image into Unity and displaying it with an Unlit shader results in an image that’s just… off. The most noticeable differences are the green tint and different brightness, but basically the curve for every color channel is off from what it should be.
The Left image is what it looks like in Unity with an Unlit shader; the Right is what the image actually looks like outside of Unity; the Middle is after writing a custom shader to try and restore the image to what it should look like. I got fairly close, but may just need to write a program to sample every pixel, output a lookup table, and then try to turn that into a polynomial.
I’ve tried everything I can think of in terms of import and other Unity settings: bypass sRGB, render & camera settings, different lighting modes, mip maps on/off, quality settings. Nothing seems to affect the image color at all (which I would expect, with it being unlit), but that also means that nothing fixes the issue.
Why would Unity not display images in normal monitor color space like every other program I’ve tried?
Here is the shader I set up to try and restore the color as closely as possible to the correct (outside of Unity) color space. As you can see, it’s not a simple conversion, and even this isn’t quite right (for instance, there’s too much red at the lower-midtones).
Not seeing this…anything I save from Photoshop has the identical RGB values in Unity with an unlit shader. Maybe something with color profiles or using compressed textures.
Hey Eric,
Thanks for the post! Sorry I missed your response - usually I get an email, not sure how I missed this one.
It’s definitely strange. I did make sure to use uncompressed textures. If by color profiles you mean the profile of the monitor, I should mention that it was off on both monitors attached to the machine, though the color profiles could certainly be calibrated. However, it also looked off when we were testing on a new Apple 5k display - we were building this for an expo and were using said monitor, and that’s where we first noticed the issues.
If you mean something about the color space definition within Unity, I haven’t found a setting that seemed to make any difference.
It’s a pretty simple repro: I’m just displaying the images as sprites within uGUI (I also tried applying with an unlit material to a quad). I’ll upload a repro to see if anyone else can replicate the issue.