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

◆ blur2d() [2/2]

void blur2d ( CRGB * leds,
uint8_t width,
uint8_t height,
fract8 blur_amount,
const fl::XYMap & xymap )

Two-dimensional blur filter.

Spreads light to 8 XY neighbors.

  • 0 = no spread at all
  • 64 = moderate spreading
  • 172 = maximum smooth, even spreading
  • 173..255 = wider spreading, but increasing flicker

Total light is NOT entirely conserved, so many repeated calls to 'blur' will also result in the light fading, eventually all the way to black; this is by design so that it can be used to (slowly) clear the LEDs to black.

Parameters
ledsa pointer to the LED array to blur
widththe width of the matrix
heightthe height of the matrix
blur_amountthe amount of blur to apply

Definition at line 471 of file colorutils.cpp.

472{
473 blurRows(leds, width, height, blur_amount, xymap);
474 blurColumns(leds, width, height, blur_amount, xymap);
475}
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
XYMap xymap(WIDTH, HEIGHT, SERPENTINE)
void blurRows(CRGB *leds, uint8_t width, uint8_t height, fract8 blur_amount, const XYMap &xyMap)
Perform a blur1d() on every row of a rectangular matrix.
void blurColumns(CRGB *leds, uint8_t width, uint8_t height, fract8 blur_amount, const XYMap &xyMap)
Perform a blur1d() on every column of a rectangular matrix.

References blurColumns(), blurRows(), leds, and xymap.

Referenced by blur2d(), fl::Blend2d::draw(), and loop().

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