pathfinder icon indicating copy to clipboard operation
pathfinder copied to clipboard

Artifact when rendering large numbers of overlapping paths

Open alec-deason opened this issue 3 years ago • 9 comments

I'm seeing artifacts when rendering scenes with large numbers of paths that overlap. It looks like it's related to the renderer's tiles somehow but it isn't strictly a paths per tile issue (see the third image). Here's the roof from the canvas_minimal example drawn on top of itself thousands of times:

screenshot

Obviously that's a pathological case but the artifacts start to show up with a much smaller number of overlaps (30 in this case):

screenshot

I'm seeing it in real use as well where complex objects are drawn on top of other paths:

screenshot

The bottom half of the screen in that example should be solid black but instead has lines of sky color showing through. That also shows the artifact in tiles which don't actually contain a large number of paths, like the ground on the right edge where there should just be two paths overlapping, one for the sky and one for the ground.

The code I used to produce the top two images: https://gist.github.com/alec-deason/2518dfce805c8222ab96c7c336336555

The only issue I could find that looks similar is the lines shown here: https://github.com/servo/pathfinder/issues/284#issuecomment-597564528_

I'm seeing this in both the GL and WebGL renderers on an Intel GPU on Linux and latest commit to pathfinder.

alec-deason avatar Jul 18 '20 19:07 alec-deason