FastLED 3.10.6
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 287 of file pixel_controller.h.

287 {
288 switch(dither) {
289 case BINARY_DITHER: init_binary_dithering(); break; // Initialize dithering algorithm
290 default: fl::Dither::clear(d, e); break; // Clear dither values (disabled)
291 }
292 }
void init_binary_dithering()
Set up the values for binary dithering from the shared frame phase.
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.
static FASTLED_FORCE_INLINE void clear(u8(&d)[3], u8(&e)[3]) FL_NO_EXCEPT

References BINARY_DITHER, fl::BinaryDither::clear(), 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: