3 ms·
you can use (abuse?) multiplication to get a nice dither without any tables: bool dither(int time, int value) { time *= value; return (value + time ^
by legosexmagic 4y ago
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)