I’ve been using the outline material of this post, which I modified a bit to suit my needs.
I’m not good at all with materials, and this is the only material I’ve ever used and probably the only one I will ever use, so I’m not very interested right now to understand exactly what is it doing, altough I understand the general idea.
I would like to modify the material so that it won’t draw outlines of an occluded object. This is what it looks like now:
You can see that the white outline is drawn both for the visible part of the object I’m aiming at and the occluded part. I would like to NOT draw the occluded part at all.
Now, I managed to do this with other outline materials, but not this one. The most I could do was to draw only the visible part but without any outlines, like this:
If you could point me in the right direction I would really appreciate it!
This is the relevant part of the material, where we have the outline result and the computation to check if the current pixel is being occluded or not: