Sorry for the late reply, I have been on Christmas vacation and have just returned.
Thanks for the email and the detailled description. I will get back to you as soon as I have a solution to offer.
Unfortunately the problem lies in the fundamental difference of alpha blending of two colors in Linear and in Gamma space.
Imagine you are gradually incrementing Gamma space values from 0.0 in 0.1 increments, then you will longer stay at darker values when compared to incrementing Linear space values from 0.0 in the same step size.
Alpha-blending is defined as multiplication of the color value in the target color space. Now consider your example of:
foreground = (0, 1, 0), background = (1, 0, 0) and alpha = 0.5
Note: no matter in which color space, Linear(1)==Gamma(1)
This leads to:
result = (0.5, 0.5, 0)
The problem here is that when the render settings are configured to use Linear color space, the result is finally converted to Gamma space, resulting in a very bright Gamma value of 0,73.
In other words, combining any two color values in Linear space will result in lighter values than combining them in Gamma space.
In yet other words, the problem here is that the alpha blending function is defined by the color space. If you want alpha blending in Unity to behave as in the Spine Editor (unfortunately, the Spine Editor does not yet provide functionality to display blending in Linear color space.), so that your texture values of pure green
and pure red
with alpha 0.5
result in 128 red, 128 green
, then you have to switch to Gamma space. The main reason to use Linear color space is that light is accumulated correctly and light interaction with surfaces at angles behaves more correctly in Linear space. If however you need blending to be intuitive and don't need light interaction at all different angles to behave as in the real world, Gamma space will be easier to handle. It will also save the overhead of the two conversions from Gamma space to Linear space and back again.