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

◆ blur1d() [1/2]

void fl::blur1d ( CRGB * leds,
fl::u16 numLeds,
fract8 blur_amount )

Definition at line 55 of file blur.cpp.

55 {
56 fl::u8 keep = 255 - blur_amount;
57 fl::u8 seep = blur_amount >> 1;
58 CRGB carryover = CRGB::Black;
59 for (fl::u16 i = 0; i < numLeds; ++i) {
60 CRGB cur = leds[i];
61 CRGB part = cur;
62 part.nscale8(seep);
63 cur.nscale8(keep);
64 cur += carryover;
65 if (i)
66 leds[i - 1] += part;
67 leds[i] = cur;
68 carryover = part;
69 }
70}
CRGB leds[NUM_LEDS]
unsigned char u8
Definition int.h:17
CRGB & nscale8(fl::u8 scaledown)
Scale down a RGB to N/256ths of its current brightness, using "plain math" dimming rules.
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>
Definition crgb.h:567
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:86

References CRGB::Black, leds, and CRGB::nscale8().

+ Here is the call graph for this function: