Trying to get Tom Looman's Shadow Outline material to work...

Hey all. I’ve been trying to get a particular effect to work for the past several days and I’ve been having absolutely no luck in terms of progress, so I’m here to see if anyone can point out what I am doing wrong. So, I’ve been trying to recreate the outlined shadow effect that tom looman shows in his blog here:

What I do have so far is the shadow part. That was quite easy to implement, just following the steps he laid out in another blog post. However, What I am having trouble with is getting the outline part. The outline material that I think he is referring to is the blog post here: From what he said, I thought it would be just a simple matter of replacing the scenetexture: depth nodes with the custom node that produces the shadow effect, but just trying that doesn’t do it, and at this point I’m out of ideas on how to hook this up so it all works.

I already tried contacting Tom but haven’t been able to get in touch with him, so I was wondering if anyone had any idea on how to hook this all up to make it work?

Update: Ok, right after I post I finally get some progress. Still have somewhat of a problem though. Now I am able to get the outline I was looking for, but trying to get the width I want is proving troublesome. As shown in the image below, when the outline width is small, the outline looks fine, but when it is big, the outline splinters near sharp corners. Does anyone have an idea on how i can fix this? I thought maybe I could use something like a Gaussian blur, clamp, and then round the result to get a smoother outline, but I’ve not yet found a way to blur anything in the material editor. Or if anyone knows a way to just use the smaller, correct looking outline as a base and just expand the colored area from there, that would also probably work.

Update: Investigating further, it seems everything is double or triple outlined. If there is an area where there should be just one point/sharp edge to the outline, there are three, with the middle one seemingly being the correct shape and location. I just don’t know of a way to separate that correct outline from the false ones. I don’t even understand what is creating the triple outline situation.