allow gamma corrected preview without gamma corrected LEDs

This commit is contained in:
Frank
2023-08-05 00:06:58 +02:00
parent f010adfe24
commit 8e678ffa5e
4 changed files with 18 additions and 7 deletions

View File

@@ -240,7 +240,7 @@ static bool sendLiveLedsWs(uint32_t wsClient) // WLEDMM added "static"
//WLEDMM: no skipLines
uint32_t c = restoreColorLossy(strip.getPixelColor(i), stripBrightness); // WLEDMM full bright preview - does _not_ recover ABL reductions
// WLEDMM begin: preview with color gamma correction
if (gammaCorrectPreview && gammaCorrectCol) {
if (gammaCorrectPreview) {
uint8_t w = W(c); // not sure why, but it looks better if using "white" without corrections
buffer[pos++] = qadd8(w, unGamma8(R(c))); //R, add white channel to RGB channels as a simple RGBW -> RGB map
buffer[pos++] = qadd8(w, unGamma8(G(c))); //G