Skip to content

Restore pre 16.0 looks on several FX#5684

Open
DedeHai wants to merge 2 commits into
wled:mainfrom
DedeHai:restore_FX_looks
Open

Restore pre 16.0 looks on several FX#5684
DedeHai wants to merge 2 commits into
wled:mainfrom
DedeHai:restore_FX_looks

Conversation

@DedeHai

@DedeHai DedeHai commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

fix for #5603

Tested in direct comparison to 0.15 and the updated effects now look pretty similar.

I was not able to fully restore the looks of "Pacifica" as that effect really relies on direct color manipulation which gets changed with applying gamma. I made some tweaks to brighten it up and it does not look bad, just a bit different.

Summary by CodeRabbit

Release Notes

  • Effects
    • Refined color and brightness rendering across traffic light, pacifica, noise palette, fire, and audio-reactive effects for improved visual output.
    • Updated matrix and octopus visuals with adjusted brightness/fade behavior for smoother transitions and deeper tones.

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3c840b8a-ffa9-4b0a-92c4-e5825062316d

📥 Commits

Reviewing files that changed from the base of the PR and between ca45c1e and 3d9b38a.

📒 Files selected for processing (1)
  • wled00/FX.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • wled00/FX.cpp

Walkthrough

Across wled00/FX.cpp, fourteen effect functions are updated to use gamma8inv/gamma32inv for color and brightness computation instead of raw constants, fixed ranges, or forward-gamma calls. Palette data in mode_pacifica and mode_noisefire is adjusted, and a post-processing step in mode_pacifica is commented out.

Changes

Gamma inversion across WLED effects

Layer / File(s) Summary
Classic/visual effects: gamma inversion and palette updates
wled00/FX.cpp
mode_traffic_light case 3 uses gamma32inv for the second LED color. mode_pacifica replaces all three hardcoded palette constants with gamma-inverted values and comments out the "deepen blues and greens" post-processing. mode_noisepal derives minBri = gamma8inv(128) for CHSV V-components. mode_tv_simulator switches nr/ng/nb from gamma8 to gamma8inv. mode_2Dmatrix lowers the trail fade minimum and switches spawnColor/trailColor to gamma8inv-based RGBW values. mode_noisefire raises the darkest palette V entries.
Audio-reactive effects: gamma inversion for brightness
wled00/FX.cpp
mode_DJLight, mode_freqmatrix, mode_freqwave, and mode_waterfall (samplePeak path) switch brightness computation to gamma8inv. mode_2DFunkyPlank applies gamma8inv(v) to per-column brightness. mode_2Doctopus comments out the intensity non-linearity mapping, leaving raw intensity for palette indexing.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • wled/WLED#4522: Also modifies mode_tv_simulator in wled00/FX.cpp, overlapping directly with the intermediate channel calculation changes in this PR.
  • wled/WLED#4710: Introduces and uses gamma8inv (inverse gamma table) for particle brightness, directly connected to the same inverse-gamma adoption applied across effects in this PR.
  • wled/WLED#4722: Introduces gamma32inv and applies it in the pride effect in wled00/FX.cpp, directly related to the gamma32inv usage added in mode_traffic_light here.

Suggested labels

enhancement, effect

Suggested reviewers

  • softhack007
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly summarizes the main change: restoring pre-16.0 visual appearance of multiple effects.
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@wled00/FX.cpp`:
- Around line 4762-4765: The comment on line 4762 states "Apply gamma
correction, further expand to 16/16/16" but the code on lines 4763-4765 does not
actually apply gamma correction—it only multiplies by 257 to expand 8-bit color
values to 16-bit. Update the comment to accurately reflect the actual behavior:
remove the mention of gamma correction and describe only the 8-bit to 16-bit
expansion via multiplication by 257.
- Around line 4185-4192: The hardcoded Pacifica palette values
(pacifica_palette_1, pacifica_palette_2, pacifica_palette_3) are pre-inverted
for gamma 2.0, but they are not adjusted when the user changes the configurable
gamma setting at runtime via the HTTP API, causing visual inconsistency. Either:
(1) modify the palette initialization or retrieval logic to apply runtime gamma
correction using the current gammaCorrectVal and recalculate the palette values
whenever NeoGammaWLEDMethod::calcGammaTable() updates the gamma tables, or (2)
add clear documentation in the Pacifica effect explaining that the palette
appearance assumes gamma 2.0 and will shift visually if gamma is changed, along
with a comment in the code near the palette definitions noting this constraint.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e7d4b123-d52f-4caa-a0c6-219805dbd75c

📥 Commits

Reviewing files that changed from the base of the PR and between 8dfd2cf and ca45c1e.

📒 Files selected for processing (1)
  • wled00/FX.cpp

Comment thread wled00/FX.cpp
Comment thread wled00/FX.cpp Outdated
@DedeHai

DedeHai commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator Author

ready to merge, if anyone wants to test still please state so, otherwise I will merge&cherry pick by the end of the week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants