289 {
290 int center = int(p.position);
291 float frac = p.position - float(center);
295
297 int idx = center -
offset;
299 continue;
300
301
302 float falloff = 1.0f - (float(
offset) / float(p.headWidth)) * 0.8f;
303 CRGB pixel = baseColor;
305
306
307 if (
offset == 0 && frac > 0.01f) {
308 int nextIdx = center + 1;
310 CRGB subPixel = pixel;
313 }
315 }
316
318 }
319}
static void writeMax(CRGB &dst, const CRGB &src) FL_NO_EXCEPT
CRGBPalette16 mAmbientPalette
fl::vector< CRGB > mTrailBuffer
fl::UISlider offset("Offset", 0.0f, 0.0f, 1.0f, 0.01f)
u8 clamp_u8(float v) FL_NO_EXCEPT
CRGB ColorFromPalette(const CRGBPalette16 &pal, fl::u8 index, fl::u8 brightness, TBlendType blendType) FL_NO_EXCEPT
float falloff(float distance, float sigma)
Smooth bump: 1 at distance 0, 0 at distance >= sigma.
CRGB & nscale8(u8 scaledown) FL_NO_EXCEPT
Scale down a RGB to N/256ths of its current brightness, using "plain math" dimming rules.