Cartoon shader improvements

Hmm… Actually a kernel of a thought does come to mind, inspired by something that I saw elsewhere, but I’m not at all sure that it would work, or perform well.

The idea is to perform two passes of a form of edge detection: one detecticing vertical runs of “inked” pixels and one detecting horizontal runs. (If both can be done in a single pass then all the better.) The trick would be to determine directionality: if one could determine the “origin pixel” for the run–that is, the first “ink” pixel along the line of the run–then one could add “ink” pixels along the horizontal and vertical runs, fading along the length of the run.