News for hackers. Stuff that matters.
Re:Grayscale on 1-bit LCDs (2022) by legosexmagic on Thursday January 12, 2023 @06:10PM (#34361572)
you can use (abuse?) multiplication to get a nice dither without any tables:

  bool dither(int time, int value) {
    time *= value;
    return (value + time ^ value ^ time) < 0;
  }
where value is in the range 0 ... (int_max/2)

There are no comments on this comment yet.