paperGrainBases function

List<int> paperGrainBases(
  1. int base,
  2. int g
)

base with the extreme grain texels at grain g ‰ over it: the base, the darkest fleck over it, the lightest fibre over it.

Implementation

List<int> paperGrainBases(int base, int g) {
  final b = base | 0xFF000000;
  return [
    b,
    compositeOver(withAlpha(0xFF000000, paperFleckAlpha(g)), b),
    compositeOver(withAlpha(0xFFFFFFFF, paperFibreAlpha(g)), b),
  ];
}