mirror of
https://github.com/leozide/leocad
synced 2025-01-18 22:26:44 +01:00
Use simple multiplicative tint for fade.
This commit is contained in:
parent
b94b401b06
commit
13ae577533
1 changed files with 2 additions and 6 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue