📜  unity 混合渐变颜色 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:51.357000             🧑  作者: Mango

代码示例1
static Color EvaluateColorMix(float relativeX, float relativeY, Gradient horizontal, Gradient vertical)
{
  Color h = horizontal.Evaluate(relativeX);
  Color v = vertical.Evaluate(relativeY);
  return MixColors(h, v);
}

static Color MixColors(Color a, Color b) => (a + b) / 2;