-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken rendering of Vectorscope #7518
Comments
It works under X11 and therefore only is a problem under Wayland. It is caused by the calls to lmms/plugins/Vectorscope/VectorView.cpp Line 254 in 1825208
And here: lmms/plugins/Vectorscope/VectorView.cpp Line 256 in 1825208
The method
It might break another case though? I am not sure why it is necessary to use the device/pixel ratio here. |
There's also a problem with the general functionality under Wayland. The screen is not cleared if HQ mode is disabled but everything works in HQ mode: Broken.Vectorscope.in.Non-HQ.webm |
With the fix described above the broken rendering starts to appear when the value of the variable |
I noticed, on latest master, than it occurs only with a persistence of 1. This is expected, as I would believe there is no persistance for a value of 1 (that is 100%). |
Did you test it under Linux with Wayland, @bratpeki? It seem that upscaling pixmaps does not work on that platform like it works on X11. |
No, this is on Windows, works just fine! |
Basically in all my LMMS work, I use this in context of forcing Qt to draw at native resolution. Otherwise everything tends to be drawn in the "96 DPI Qt logical pixels" and looks terrible after upscaling to match the display DPI (especially with fractional scaling). The Waterfall display of Spectrum Analyzer uses a very similar drawing method to the Vectorscope, so it could be affected as well (I don't have any Wayland systems, so I can't check). Not sure about the screen redraw; looking at the video again, the Persistence knob itself is getting brighter and distorted, so it clearly has nothing to do with the persistence setting or the visualization bitmap? It seems to affect the final bitmap that Qt renders for the entire widget or sub-window, so I'm leaning toward some Qt bug under Wayland. Though it's a bit odd that black would be treated as transparency if it was a bug – the effect it has seems almost... intentional... Weird. |
Ok, if I understand correctly, the reasoning is the following: rendering pixmaps with fractional scaling will resample them and make them look rather bad. The Vectorscope used pixel "bins" for the traces and is therefore also pixmap based. Therefore something needs to be done to counter that. Is this correct? Another option might be to render the trace with line segments. It might use something like a ring buffer of positions which would be rendered as line segments that get progressively fainter the older they are. This approach might allow for some nice scaling but might have an impact on the performance.
I have just checked and was not able to get any artifacts for the Waterfall display of the Spectrum Analyzer. So there seems to be a difference in the implementation which prevents the bug.
I am under the impression that it might indeed be a Qt bug that occurs under certain circumstances when a QImage/QPixmap (don't remember which) is scaled to a larger size. |
System Information
Linux - Wayland
LMMS Version(s)
1825208
Bug Summary
The Vectorscope plugin renders in a broken way on a Linux Wayland system:
Bildschirmaufnahme_20240925_170936.webm
Steps To Reproduce
Please search the issue tracker for existing bug reports before submitting your own.
The text was updated successfully, but these errors were encountered: