Repository navigation
Fix double application of FillAlpha in shaded plots - #717
Merged
Merged
Conversation
ImPlot already applies FillAlpha to the constant fill color in BeginItem. The shaded render paths applied the same value again through GetterConstColor, making fills too transparent due to the double application. To fix stop passing FillAlpha a second time for constant-color fills in: - shaded PlotLine calls - shaded PlotStairs calls - PlotShaded calls
Collaborator
|
Ooops, I introduced this bug in #672. Sorry!
|
brenocq
self-requested a review
October 25, 2026 08:04
BeginItemEx already scales FillColor by FillAlpha, so constant-color fills must not apply it again. epezent#672 added a second multiplication through GetterConstColor; the previous commit removes it from the shaded line, stairs and PlotShaded paths, and this one removes it from PlotBarsVEx and PlotBarsHEx, which also serve PlotBarGroups and PlotHistogram. A fill with FillAlpha 0.5 now draws at 0.5 instead of 0.25, matching per-index FillColors and the behavior before epezent#672. With no caller passing an alpha any more, GetterConstColor loses its alpha parameter so the double application cannot come back.
Collaborator
|
The same double application was also in |
brenocq
approved these changes
Oct 25, 2026
brenocq
left a comment
Collaborator
There was a problem hiding this comment.
Great catch, thanks @martinecker!!
mgradwohl
added a commit
to mgradwohl/tasksmack
that referenced
this pull request
Oct 28, 2026
…3166) (#3188) ImPlot v1.1 (819f2006) is 52 commits ahead of our pin and 0 behind, so it keeps the anti-aliased line texture fix (#2744). Keep the SHA pin; the comment now reads "# v1.1", so Renovate's implot regex manager tracks ImPlot again, and the generated THIRD_PARTY_NOTICES.txt names "implot v1.1" instead of "master after v1.0". v1.1 applies ImPlotSpec::FillAlpha to a single-colour fill once instead of twice (epezent/implot#717). TaskSmack's fills carry their alpha in the fill colour and never set FillAlpha (default 1), and the second multiplication was skipped for an alpha of 1, so every chart fill draws exactly as before. tests/UI/test_PlotShadedFill.cpp renders the fills headless and holds their vertex colours to it: the theme fill's alpha (0x4D = 77) on both pins, and an explicit FillAlpha of 0.5 at 128 on v1.1 (64 on 7eeb9168). No API our code uses changed: v1.1's public API changes are additions. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


ImPlot already applies FillAlpha to the constant fill color in BeginItem. The shaded render paths applied the same value again through GetterConstColor, making fills too transparent due to the double application.
To fix stop passing FillAlpha a second time for constant-color fills in: