PNG Transparency is different in Unity than Photoshop (924017)

I’m creating a png with an outer glow in Photoshop, and importing that into Unity to use as a UI Image (Screen Space - Overlay canvas).

The glow in Unity seems to have the incorrect alpha since the glow shows as much thicker and brighter in Unity than it does in Photoshop.

I’ve attached how the png looks in Unity and and in Photoshop for comparison.

Why is there a difference between the two? I would like it to look exactly how it does in Photoshop. I’ve tried playing around with the settings for the import:

  • Disabling sRGB
  • Changing Wrap Mode to all other types
  • Changing filter mode to all other types
  • Using no compression
  • Using any of the other compression options
  • Changing the Format from Automatic to all the other options
  • Changing the Resize Algorithm
  • Applying a UI/Additive shader

Is there anything else I can change to fix the alpha channel?



Does it look correct if you switch your project to use Gamma?

Yup, that looks much more correct! Though I hope this isn’t the only solution – keeping my game as Linear is important.

I’m pretty sure there are semi-legitimate excuses for why it’s like that in Linear. For example 50% from white to black is a different grey in Linear and in Gamma.

But it’s also true that Unity has been declaring they are spending effort to get Linear color right all the way back from the Unity 4 days, only for later generations of Unity employees to declare their Linear implementation as half assed and incomplete and announce a renewed attempt to “get it right” - repeat ad finitum.

The truth is there are a lot of parts of Linear that are still ass, with excuses of various levels of legitimacy, and in the meantime they have also kinda broken Gamma space.

lol, that’s sad to hear. I appreciate the insight! That’s frustrating that the colors can’t be corrected in Linear within Unity itself. It seems like I need to author the texture some other way in Photoshop beforehand.

The docs mention something along these lines
Selecting Color Space: Linear assumes your Textures are in gamma color space. Unity uses your GPU’s sRGB sampler by default to crossover from gamma to linear color space.

Disabling sRGB sampling changes the colors ever so slightly (more vibrant white in my texture), but it doesn’t fix the transparency issue at all.

The colors are being corrected (they are being degammaed), the alpha channel is not touched though since it intended to be linear.

The blending between colors being different in gamma and linear is supposedly one of the main reasons you’d want to use linear, since the linear one is more “correct”.