Assessing Skia: Blending and path self-intersection

32 views
Skip to first unread message

Jesse Hemingway

unread,
Aug 8, 2026, 1:31:04 PM (3 days ago) Aug 8
to skia-discuss
I haven't used Skia yet, but I was hoping someone could answer what I hope is a straightforward question about its path rendering capabilities.

I have a 2D generative vector engine that uses Apple's CoreGraphics for rendering. It often relies on "additive" blend modes like screen or multiply. However, a single path in CoreGraphics will not blend with itself, as though it is rasterized or somehow "baked" prior to blending. Therefore, I have to painstakingly split a given curve into subpaths that are not likely to intersect themselves (an inexact science), to achieve the desired additive blend effect when the subpaths intersect.

Is this kind of thing easier in Skia, or would I still be forced to break complex curves into subpaths so that intersections are properly blended?

Many thanks to anyone with insight into this often poorly documented aspect of rendering engines!


Greg Daniel

unread,
Aug 8, 2026, 2:06:15 PM (3 days ago) Aug 8
to skia-discuss
Currently Skia uses the same model and will only shade a pixel once for a given path. Thus if the path self-intersects, you will not see blending between the path and itself. The path just defines an area that is covered or should be shaded; the shading then depends only on the pixel's position.

However, we are currently working on an experimental feature that will allow shading along a path where the shading depends on the current distance along the arc length and the tangential distance from the path. In this new path drawing, we would support blending with self intersections.

Greg

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/skia-discuss/368778c8-d891-4be5-b13d-e5e2c7baf6d3n%40googlegroups.com.

Jesse Hemingway

unread,
Aug 8, 2026, 7:30:15 PM (2 days ago) Aug 8
to skia-discuss
Thanks for the fast and informed response! The upcoming features sound great, kinda like distance fields ready-to-bake, or something. 

In my case, I'm adding lots of semi-circular 2D "oscillators" to produce complex cycloid-like designs composed of line segments only, and I'm not aware of any way to convert this to parametric functions.  But at least you've corroborated that there is no common support for the use case I have in mind, and splitting out sub-paths would seem to be the only option.

Cheers,
Jesse

Reply all
Reply to author
Forward
0 new messages