Performance: Render dense lines as bands - #260
Merged
Merged
Conversation
|
View snapshot changes at kitdiff |
emilk
added a commit
to emilk/egui
that referenced
this pull request
Sep 22, 2026
Add `BandShape` to epaint, supporting and varying width band along some direction. This can be useful in egui_plot, e.g. for filling the area under a curve, or for visualizing a audio waveform, for instance. The band has feathering for the fill, plus an optional stroke that is just drawn on top of the fill. This solves a small subset of non-convex polygons (since the general solution is quite difficult, at least if you want feathered edges). <img width="493" height="180" alt="Screenshot 2026-09-01 at 20 56 33" src="https://github.com/user-attachments/assets/f79ae9bc-3512-4c87-b166-d1240a8dd3e4" /> Includes an interactive waveform demo and alpha screenshot coverage. Related work: - #513 - emilk/egui_plot#260 --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Resolve conflicts: * `Cargo.toml`: point the `egui` patch at `main` (the band-shape work has landed there) * `Cargo.lock`: take `main`, then update the `egui` git deps * `series.rs`: keep the existing `Color32` import and drop the now-unused `Id` Co-Authored-By: Claude Opus 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.
BandShapeegui#8476Agreggate high-resolution plot line series into varying-width "bands".
This greatly lessens the load on the egui tessellator.
In the benchmark I added in #258: