[Urgent] Silhouette-Outlined shader depth issues

Hi there

I am using the Silhouette-Outlined Diffuse shader from the wiki (http://wiki.unity3d.com/index.php?title=Silhouette-Outlined_Diffuse).

I need to change it so that the outline stroke itself is visible through other objects, but it only colours the outline rather than the objects in front of it, like so:

1155297--44037--$outline.png

I have tried changing some of the ZTest and ZWrite settings on the shader but have had no luck yet.

Any help would be appreciated!

Is it possible to use toon shading-like outlines? They work, but most are awful with “squared” models (flat faces with sudden turns, like the cube)

Edit:
I started searching for ways of achieving results like of the ones that can be seen in the Left 4 Dead games. I found this link:
http://forum.unity3d.com/threads/142622-Glowing-certain-object

Look for the second post. I think that is a good work around.

Hi Kirlim

Thanks for your reply. That post you suggested is quite similar to another glow system that I tried before, and unfortunately encountered some issues with.

I managed to get a good glow/outline system working by using Chicken’s Shader Bundle.

All solved now cheers