OutlineEffect with flat surfaces

I’m making use of the OutlineEffect.js (used in this example).

It looks great on curved things, but when you have flat edges, the outline looks disjointed like this:

I guess it’s offsetting the faces and not extending them.

I am certainly not good enough to modify the existing code, so could anyone suggest an alternative outline effect, or anything I could do to improve the appearance?

Depending on your requirements you could use OutlinePass or implement your own custom outline effect based on basic edge-detection algorithms like Sobel.

Thanks for the response. I’ve looked at the outline pass in the past and it, unfortunately, won’t suit my requirements (a question you actually helped me with so thanks!).

I’ll check out the edge detect you have mentioned, I assume since that’s a post-process it has quite a negative affect on performance.