Closed corporateshark closed 1 year ago
I'll be honest. I don't see any difference in the before/after photos.
But I suspect your problem is in the order of arguments passed to PlotLine, which recently added a flags argument before offset and striding. This was a necessary evil, so I'm sorry if that's your issue.
The issue is that the lines are seemed to be antialiased in some different way - they are not crisp sharp any more. I will check the order of arguments though.
@epezent I checked (and removed) the offset parameter from my code (which was always set to 0 anyways). The result is the same - new untialiased lines look really, well..., ugly. Any other recent changes related to this issue? What else should I check?
@epezent I experimented a bit further and here's what I found:
I use the old version of ImPlot (the one that is working correctly for me) and add the ImPlotFlags_AntiAliased
flag to BeginPlot()
. Now I have exactly the same graphics issue in the old version as is the default behavior of the new version. For some reason, the new version renders lines as if ImPlotFlags_AntiAliased
is always set which is not the case.
The actual code in ImPlot indeed ignores the ImPlotFlags_AntiAliased
flag and has now only one, always software antialised, code path for lines.
As the documentation says, it looks ugly indeed 😃
ImPlotFlags_AntiAliased = 1 << 10, // plot items will be software anti-aliased (not recommended for high density plots, prefer MSAA)
Have you found a workaround?
@nuuSolutions Not really, that old code path is completely missing from the new function. Unfortunately, I have to use the last working version 79b05d5e259fc2a83075cc7d8058b13b810da00b.
I'm pro anti-aliasing, but it should look right/better. Maybe we sign a petition for that!?
We abandoned our custom anti-aliasing pipeline via ImPlotFlags_AntiAliased
in favor of ImGui's texture based anti-aliasing for performance and maintainability reasons. Please read up on ImDrawListFlags_AntiAliasedLinesUseTex
and ImGuiStyle::AntiAliasedLinesUseTex
:
https://github.com/ocornut/imgui/issues/3245
Alternatively, you can enable MSAA in your application (4x should do).
The diff 63d5ed94b77acdf73201a00074bfd80467f50f0a introduced some breaking changes in how
ImPlot::PlotLine()
works.Before:
After:
Code: