There is an excellent NPR shader script here: https://www.noboundrees.com/yinako/tut/nprs/nprstut.html you might try making one of these and picking it apart in hypershade to see if it uses one to get it's edge lines. BTW, I'm working on a bunch of cel-shaded FMV's right now, if you have any ideas or want any ideas maybe we could exchange methods?