开发者

What is the formula for extracting the src from a calculated blendmode?

开发者 https://www.devze.com 2022-12-17 09:04 出处:网络
How does one go about using a alpha blending formula to achieve the src rgb color from the resultant 开发者_Go百科of the 2 blended togetherWell, you can just reorder the alpha blending equation

How does one go about using a alpha blending formula to achieve the src rgb color from the resultant 开发者_Go百科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.

0

精彩评论

暂无评论...
验证码 换一张
取 消