void UpdateFalloffCurve() { var colors = new Color[GRADIENT_SIZE]; for (var i = 0; i < GRADIENT_SIZE; i++) { colors[i] = lightGradient.Evaluate(i / (float)GRADIENT_SIZE); colors[i].a *= fallOffCurve.Evaluate(i / (float)GRADIENT_SIZE); } FallOffTexture.SetPixels(colors); FallOffTexture.Apply(); }
void RegenerateCurve() { var colors = new Color[128]; for (var i = 0; i < 128; i++) { colors[i] = lightGradient.Evaluate(i / 128.0f); colors[i].a *= fallOffCurve.Evaluate(i / 128.0f); } FallOffTexture.SetPixels(colors); FallOffTexture.Apply(); }