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

◆ loadAndScale() [1/4]

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 >::loadAndScale ( PixelController< RGB_ORDER, LANES, MASK > & pc)
inlinestatic

Complete pipeline: load → dither → scale (THE MAGIC HAPPENS HERE!) Order is critical: pixel + dither FIRST, then scale by brightness.

Definition at line 462 of file pixel_controller.h.

462 {
463 return scale<SLOT>(pc, pc.dither<SLOT>(pc, pc.loadByte<SLOT>(pc)));
464 }
fl::UISlider scale("Scale", 4,.1, 4,.1)
static FASTLED_FORCE_INLINE fl::u8 loadByte(PixelController &pc)
Read a byte of LED data.
static FASTLED_FORCE_INLINE fl::u8 dither(PixelController &pc, fl::u8 b)
Add dither offset to pixel value (BEFORE scaling).
Pixel controller class.

References PixelController(), dither(), FASTLED_FORCE_INLINE, loadByte(), and scale.

Referenced by advanceAndLoadAndScale(), advanceAndLoadAndScale(), advanceAndLoadAndScale(), loadAndScale0(), loadAndScale0(), loadAndScale0(), loadAndScale1(), loadAndScale1(), loadAndScale1(), loadAndScale2(), loadAndScale2(), and loadAndScale2().

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