So, i have a weird phenomena here i cannot get rid of:
here I am using a gradient to stroke a path.
The path is just an open path.
Sometimes (depending on the path’s shape) I get these weird horizontal pixels rendering.
like the one in the top here.
If I use solid color, this does not happen.
It also happens to rounded rectangles with fillPath so it is not an issue with the stroke function.
It does not happen with the software renderer
This happened ever since I updated to 7.0.2
I have not tried to downgrade to 7.0.1 yet, but that is my next step.
Using MacOS Ventura 13.0.1
I would suggest bisecting over JUCE to find the exact commit which broke this. This sometimes provides a lot of insight on the problem, and sometimes even a workaround in the form of a simple revert commit.
If I attach an OpenGL context the artifact disappears. But this isn’t an option because on iOS the performance suffers a lot.
I wish I could help investigate the cause, but I am seeing this on an iOS 16 device and I can’t debug iOS 16 properly (I’m not on Xcode 14 yet so I can only install the app via Archive).
If the JUCE team are looking into this or if anyone has some tip that would be great.
If you can make a code example then I could check if this also reproduces on my macOS 12.5 setup.
If it does then I could try bisecting it.
The snippet in @assaf’s initial post refers to variables such as grad and round which are not included in the snippet, so I can’t make use of that one for a quick check.
So, I managed to get this to disappear by adding the following preprocessor definition:
JUCE_COREGRAPHICS_RENDER_WITH_MULTIPLE_PAINT_CALLS=1
It only happens on the Core Graphics renderer
To recreate - set a ColourGradient and stroke a wriggly Path and try to animate it.
The artifacts will often appear - it has to do with the shape.
I am unable to dig into this further at this time, as the pile of paperwork on my desk has almost reached the ceiling! Hopefully, January will be calmer.
I was under the impression this got fixed at some point, can’t remember when though. I have seen no artifacts for a while now, even without the multiple paint calls preprocessor definition. Are you on the latest JUCE version?