- Home /
Alpha channel values are different from Photoshop
I'm trying to create image effect and store some values in different channels of the texture. The thing is that the values in alpha channel are different in Photoshop and Unity.
Straight lines with flat color look like this:
Vertical gradient like this:
I tried different file formats (psd, png, targa) - result always the same. Import setting also don't solve the problem (tried Auto and 32bit RGBA).
Does anyone know how to fix it? This thing drives me crazy...
Thanks!
Answer by DeiCarnifex · Jan 23, 2019 at 10:50 PM
This is because by default Photoshop lies, or rather, it's not showing you the data you think it is. When you paint a color into an alpha channel or grayscale image, it's doing a color conversion to that color before painting and back again when picking and displaying. So while it'll show you "R : 128, G : 128, B : 128" in the info window for the 8-bit RGB, if you switch the info over to show you "Actual Color, 32-bit (0.0-1.0)" it'll show the value of "0.412".
255 * 0.412 = 105.06
That look familiar?
The fix is go into your color settings and change the Working Spaces for Gray from "Dot Gain 20%" to "sGray". Now it'll show you the RGB values for you thought you were painting and seeing.