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

343{ return fl::Dither::apply(b, pc.d[RO(SLOT)]); }
fl::u8 d[3]
[DITHER] Current dither offset per R,G,B channel (toggles via stepDithering)
Pixel controller class.
static FASTLED_FORCE_INLINE u8 apply(u8 b, u8 d) FL_NO_EXCEPT
Add the offset to a source byte, before scaling. Black is never lifted.

References PixelController(), fl::BinaryDither::apply(), FASTLED_FORCE_INLINE, FL_NO_EXCEPT, and RO.

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

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