apply inverse gamma to segment brightness for better color preservation (#5343)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user