从计算的blendmode提取src的公式是什么? [英] What is the formula for extracting the src from a calculated blendmode?

查看:94
本文介绍了从计算的blendmode提取src的公式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用alpha混合公式从2个混合在一起的结果中获得src rgb颜色

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

推荐答案

好吧,您只需重新排序 alpha混合方程

Well, you can just reorder the alpha blending equation


Value =(1− α )· 0 + α · Value 1

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

但是,该等式中有四个变量:α 0 Value 1 。您需要知道其中三个才能计算出第四个。因此,在您的情况下,您知道生成的颜色 Value α 以及 Value 0 。然后,您可以重新排序方程式,如下所示:

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:


α · 1 =(1− α )· 0

α · Value1 = (1 − α) · Value0Value

1 =(− 1 / α )· ((1− α )· Value 0 Value

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

也就是说,如果我理解正确的话。事实并非如此。您可能要澄清您的问题。

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

这篇关于从计算的blendmode提取src的公式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆