FastLED 3.10.8
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 312 of file pixel_controller.h.

312 {
313 // Toggles d between two values: if d=2 and e=5, becomes 3, then back to 2, etc.
314 // This spreads dithering spatially along the strip, preventing visible patterns
316 }
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, FL_NO_EXCEPT, and fl::BinaryDither::step().

Referenced by DMXSerialController< RGB_ORDER >::showPixels(), DMXSimpleController< DATA_PIN, RGB_ORDER >::showPixels(), 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: