English 中文(简体)
What is the formula for extracting the src from a calculated blendmode?
原标题:

How does one go about using a alpha blending formula to achieve the src rgb color from the resultant of the 2 blended together

问题回答

Well, you can just reorder the alpha blending equation

Value = (1 − α) · Value0 + α · Value1

However, there are four variables in that equation: α, Value, Value0 and Value1. You need to know three of them to calculate the fourth. So in your case you know the resulting color, Value, the α and maybe Value0. You can then reorder the equation as follows:

α · Value1 = (1 − α) · Value0Value

Value1 = (−1/α) · ((1 − α) · Value0Value)

That is, if I understood you correctly. Which might not be the case. You might want to clarify your question.





相关问题
Creating UIImage with per-pixel alpha from GL buffer

I m trying to take my gl buffer and turn it into a UIImage while retaining the per-pixel alpha within that gl buffer. It doesn t seem to work, as the result I m getting is the buffer w/o alpha. Can ...

working with PNGs in vb.net

I have PNG and need to know if it has an alpha (or if the alpha is completely white)? How can I accomplish this in vb.net code.

reverse colortransform alpha AS3

I m fading out a Bitmap in AS3 by repeatedly applying a ColorTransform every frame to its BitmapData; _bitmap.colorTransform(_bitmap.rect, new ColorTransform(1, 1, 1, .9, 0, 0, 0, 1)); When applying ...

How to mix two ARGB pixels?

How can I mix two ARGB pixels ? Example Here A is (Red with Alpha) and B is ( Blue with Alpha ).

Overlapping partially transparent shapes

If I draw any shape onto a surface (with SRCALPHA flag on) in a partially transparent colour it completely replaces what was underneath it, instead of overlapping like you would expect in image ...

Mask white color out of PNG image on iPhone

I know that there are already 2 relevant posts on that, but it s not clear... So the case is this...: I have a UIImage which consists of a png file requested from a url on the net. Is it possible to ...

热门标签