apply inverse gamma to segment brightness for better color preservation (#5343)

This commit is contained in:
Damian Schneider
2026-02-04 06:57:14 +01:00
committed by GitHub
parent 6b953d96eb
commit 2676ac771d

View File

@@ -1384,6 +1384,7 @@ void WS2812FX::blendSegment(const Segment &topSegment) const {
const unsigned progInv = 0xFFFFU - progress;
uint8_t opacity = topSegment.currentBri(); // returns transitioned opacity for style FADE
uint8_t cct = topSegment.currentCCT();
if (gammaCorrectCol) opacity = gamma8inv(opacity); // use inverse gamma on brightness for correct color scaling after gamma correction (see #5343 for details)
Segment::setClippingRect(0, 0); // disable clipping by default