the "ghost pixels" are from the write to ledsrgb, which assumes wrong buffer coordinates; XY() is computed using segment boundaries only. As Segment#0 later uses "blur()", the global ledsrgb buffer pixels are used and ghost pixels appear next to the white text.
Conclusion
It seems we need a different XY() function for global buffer, as it must consider the "global" width instead of segment width. I think this new global_XY() needs to also use rotation and mirroring of a segment in the calculation.
Expected Behavior
Effects look (almost) the same, independent from using global buffer or not.
Install Method
Self-Compiled or other
What version/release of MM WLED?
any 0.14.0 build
Which microcontroller/board are you seeing the problem on?
ESP32
Relevant log/trace output
No response
Anything else?
This problem exists since "global buffer" was introduced in upstream WLED 0.14.
We can either
wait until 0.14.0-beta4 is available (where global buffer will be removed)
find our own solution for MM (in case we want to keep global double-buffering)
To avoid wrong pixels, I would suggest to not use global buffer unless all segments have the same width as your overall layout. Without global buffer, there are no wrong pixels.
Code of Conduct
[X] I agree to follow this project's Code of Conduct
What happened?
The "Use global LED buffer" (LED preferences) option can add ghost pixels which are not there without global buffer.
To Reproduce Bug
It seems that "ingredients" are
width
different from the overall 2D layout, plusExample:
First Analysis
setpixelcolorXY
if (ledsrgb) ledsrgb[XY(x,y)] = col; // buffer assigned to segment
strip.setPixelColorXY(start + xX, startY + yY, col); // write-thru to NPB driver
the "ghost pixels" are from the write to ledsrgb, which assumes wrong buffer coordinates; XY() is computed using segment boundaries only. As Segment#0 later uses "blur()", the global ledsrgb buffer pixels are used and ghost pixels appear next to the white text.
Conclusion
It seems we need a different
XY()
function for global buffer, as it must consider the "global" width instead of segment width. I think this newglobal_XY()
needs to also use rotation and mirroring of a segment in the calculation.Expected Behavior
Effects look (almost) the same, independent from using global buffer or not.
Install Method
Self-Compiled or other
What version/release of MM WLED?
any 0.14.0 build
Which microcontroller/board are you seeing the problem on?
ESP32
Relevant log/trace output
No response
Anything else?
This problem exists since "global buffer" was introduced in upstream WLED 0.14. We can either
To avoid wrong pixels, I would suggest to not use global buffer unless all segments have the same width as your overall layout. Without global buffer, there are no wrong pixels.
Code of Conduct