Well, not directly within gameEditor. It also depends on what the background color is, though if you just take that as the bottom layer it is fine. It is a linear relationship, since at full transparent, 255 becomes 0. And at no transparency, it is 255, when the background is black.
Here is a more universal way of finding it the rgb.
- Code: Select all
r = lowerR-[(lowerR-upperR)*upperTransp]
Same goes for green and blue. The lower layer is the one with the smaller zdepth, and if you were to stack this effect, you would work from the bottom layer up, though you can compound this equation to do multiple layers at a time.
To address your example, I will assume the background is black.
[top layer] (255, 0, 0) at 0.5
[mid layer] (0, 255, 0) at 0.5
[bg layer] (0, 0, 0) at 1
Then the mid layer and background layer make
(0, 128, 0) at 1
Combine this new layer with the top layer and you get
(128, 64, 0) at 1
which is the resulting rgb of that pixel.