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

一个人想着一个人 提交于 2019-12-11 08:47:58

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/2139350/what-is-the-formula-for-extracting-the-src-from-a-calculated-blendmode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!