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

◆ dither() [2/2]

template<EOrder RGB_ORDER, int LANES = 1, fl::u32 MASK = 0xFFFFFFFF>
template<int SLOT>
static FASTLED_FORCE_INLINE fl::u8 PixelController< RGB_ORDER, LANES, MASK >::dither ( PixelController< RGB_ORDER, LANES, MASK > & pc,
fl::u8 b )
inlinestatic

Add dither offset to pixel value (BEFORE scaling).

Black pixels not dithered.

Template Parameters
SLOTThe data slot in the output stream
Parameters
pcreference to the pixel controller
bthe color byte to dither
Returns
b + dither offset, clamped to 255

Definition at line 431 of file pixel_controller.h.

431{ return b ? fl::qadd8(b, pc.d[RO(SLOT)]) : 0; }
fl::u8 d[3]
[DITHER] Current dither offset per R,G,B channel (toggles via stepDithering)
Pixel controller class.

References PixelController(), d, FASTLED_FORCE_INLINE, and RO.

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

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