FastLED 3.10.6
Loading...
Searching...
No Matches

◆ stepDithering()

template<EOrder RGB_ORDER, int LANES = 1, fl::u32 MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE void PixelController< RGB_ORDER, LANES, MASK >::stepDithering ( )
inline

Step the dithering forward - creates triangular wave that toggles between pixels.

Note
If updating here, be sure to update the asm version in clockless_avr.h!

Definition at line 311 of file pixel_controller.h.

311 {
312 // Toggles d between two values: if d=2 and e=5, becomes 3, then back to 2, etc.
313 // This spreads dithering spatially along the strip, preventing visible patterns
315 }
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)
static FASTLED_FORCE_INLINE void step(u8(&d)[3], const u8(&e)[3]) FL_NO_EXCEPT
Next pixel: toggle each offset to its complement in [0, e], so neighbours dither in opposite directio...

References d, e, FASTLED_FORCE_INLINE, and fl::BinaryDither::step().

Referenced by DMXSerialController< RGB_ORDER >::showPixels(), DMXSimpleController< DATA_PIN, RGB_ORDER >::showPixels(), HD108Controller< DATA_PIN, CLOCK_PIN, RGB_ORDER, SPI_SPEED >::showPixels(), LPD6803Controller< DATA_PIN, CLOCK_PIN, RGB_ORDER, SPI_SPEED >::showPixels(), MY9221Controller< DATA_PIN, CLOCK_PIN, RGB_ORDER, SPI_SPEED >::showPixels(), P9813Controller< DATA_PIN, CLOCK_PIN, RGB_ORDER, SPI_SPEED >::showPixels(), RGBWEmulatedController< CONTROLLER, RGB_ORDER >::showPixels(), APA102Controller< DATA_PIN, CLOCK_PIN, RGB_ORDER, SPI_SPEED, GAMMA_CORRECTION_MODE, START_FRAME, END_FRAME >::showPixelsDefault(), stepAdvanceAndLoadAndScale0(), stepAdvanceAndLoadAndScale0(), stepAdvanceAndLoadAndScale0(), and REFHardwareSPIOutput< _DATA_PIN, _CLOCK_PIN, _SPI_CLOCK_DIVIDER >::writePixels().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: