FastLED 3.9.15
Loading...
Searching...
No Matches

◆ enable_dithering()

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

Toggle dithering enable/disable.

Parameters
ditherBINARY_DITHER (on) or DISABLE_DITHER (off)

Definition at line 374 of file pixel_controller.h.

374 {
375 switch(dither) {
376 case BINARY_DITHER: init_binary_dithering(); break; // Initialize dithering algorithm
377 default: d[0]=d[1]=d[2]=e[0]=e[1]=e[2]=0; break; // Clear dither values (disabled)
378 }
379 }
void init_binary_dithering()
Set up the values for binary dithering.
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 fl::u8 dither(PixelController &pc, fl::u8 b)
Add dither offset to pixel value (BEFORE scaling).
Pixel controller class.

References BINARY_DITHER, d, dither(), e, and init_binary_dithering().

Referenced by PixelController(), PixelController(), and PixelController().

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