Set up the values for binary dithering.
- See also
- "TEMPORAL DITHERING: THE COMPLETE GUIDE" section above (line 195)
Definition at line 309 of file pixel_controller.h.
309 {
310#if !defined(NO_DITHERING) || (NO_DITHERING != 1)
311
314
315
318
319
320
322
323
324 {
325 if(
R & 0x01) {
Q |= 0x80; }
326 if(
R & 0x02) {
Q |= 0x40; }
327 if(
R & 0x04) {
Q |= 0x20; }
328 if(
R & 0x08) {
Q |= 0x10; }
329 if(
R & 0x10) {
Q |= 0x08; }
330 if(
R & 0x20) {
Q |= 0x04; }
331 if(
R & 0x40) {
Q |= 0x02; }
332 if(
R & 0x80) {
Q |= 0x01; }
333 }
334
335
336
339 }
340
341
342
343
344
345 for(
int i = 0;
i < 3; ++
i) {
347
348
349
350 e[
i] =
s ? (256/
s) + 1 : 0;
351
352
354
355#if (FASTLED_SCALE8_FIXED == 1)
356
358#endif
359
361 }
362#endif
363 }
fl::u8 e[3]
[DITHER] Max dither range per R,G,B channel (inversely proportional to brightness)
fl::u8 d[3]
[DITHER] Current dither offset per R,G,B channel (toggles via stepDithering)
ColorAdjustment mColorAdjustment
References d, e, mColorAdjustment, and VIRTUAL_BITS.
Referenced by enable_dithering().