Segment layering & effect blending improvements

- Photoshop-style segment/layer blending
- return of strip ABL
- remove global LED buffer in favour of segment-local buffer
- new effect blending modes/transitions
- custom palettes moved out of WS2812FX class
- increased limits (matrix size, LED RAM)
- added "rainbow"-mode colorwheel
- replaced palettes with gamma unmodified ones
- move gamma adjustment to last step before sending to LEDs
- Segment & WS2812FX class reorganisation (mutable members, reordered members, protected members)
This commit is contained in:
Blaž Kristan
2025-04-22 22:37:18 +02:00
parent 353868414a
commit ee9ac947a1
32 changed files with 2723 additions and 2931 deletions

View File

@@ -102,9 +102,9 @@ private:
void secondsEffectSineFade(int16_t secondLed, Toki::Time const& time) {
uint32_t ms = time.ms % 1000;
uint8_t b0 = (cos8_t(ms * 64 / 1000) - 128) * 2;
setPixelColor(secondLed, gamma32(scale32(secondColor, b0)));
setPixelColor(secondLed, scale32(secondColor, b0));
uint8_t b1 = (sin8_t(ms * 64 / 1000) - 128) * 2;
setPixelColor(inc(secondLed, 1, secondsSegment), gamma32(scale32(secondColor, b1)));
setPixelColor(inc(secondLed, 1, secondsSegment), scale32(secondColor, b1));
}
static inline uint32_t qadd32(uint32_t c1, uint32_t c2) {
@@ -191,7 +191,7 @@ public:
// for (uint16_t i = 1; i < secondsTrail + 1; ++i) {
// uint16_t trailLed = dec(secondLed, i, secondsSegment);
// uint8_t trailBright = 255 / (secondsTrail + 1) * (secondsTrail - i + 1);
// setPixelColor(trailLed, gamma32(scale32(secondColor, trailBright)));
// setPixelColor(trailLed, scale32(secondColor, trailBright));
// }
}

View File

@@ -247,7 +247,7 @@ class UsermodCronixie : public Usermod {
if (backlight && _digitOut[i] <11)
{
uint32_t col = gamma32(strip.getSegment(0).colors[1]);
uint32_t col = strip.getSegment(0).colors[1];
for (uint16_t j=o; j< o+10; j++) {
if (j != excl) strip.setPixelColor(j, col);
}