Use simple multiplicative tint for fade.

This commit is contained in:
Leonardo Zide 2020-05-03 12:39:04 -07:00
parent b94b401b06
commit 13ae577533

View file

@ -511,9 +511,7 @@ void lcContext::SetColorIndexTinted(int ColorIndex, lcInterfaceColor InterfaceCo
void lcContext::SetColorIndexTinted(int ColorIndex, const lcVector4& Tint) void lcContext::SetColorIndexTinted(int ColorIndex, const lcVector4& Tint)
{ {
const float Weight = Tint.w; SetColor(gColorList[ColorIndex].Value * Tint);
const lcVector3 Color(gColorList[ColorIndex].Value * Weight + Tint * (1.0f - Weight));
SetColor(lcVector4(Color, gColorList[ColorIndex].Value.w * Tint.w));
} }
void lcContext::SetEdgeColorIndex(int ColorIndex) void lcContext::SetEdgeColorIndex(int ColorIndex)
@ -523,9 +521,7 @@ void lcContext::SetEdgeColorIndex(int ColorIndex)
void lcContext::SetEdgeColorIndexTinted(int ColorIndex, const lcVector4& Tint) void lcContext::SetEdgeColorIndexTinted(int ColorIndex, const lcVector4& Tint)
{ {
const float Weight = Tint.w; SetColor(gColorList[ColorIndex].Edge * Tint);
const lcVector3 Color(gColorList[ColorIndex].Edge * Weight + Tint * (1.0f - Weight));
SetColor(lcVector4(Color, gColorList[ColorIndex].Edge.w * Tint.w));
} }
void lcContext::SetInterfaceColor(lcInterfaceColor InterfaceColor) void lcContext::SetInterfaceColor(lcInterfaceColor InterfaceColor)