Occluded shader like Blurst's dinosaur smoke.

Hi everyone,

I would like to show my character as a flat shaded red silhouette when he’s occluded by some geometry.
The geometry will only be 2 pillar objects in the scene behind which he’s allowed to walk so it doesn’t need to be a general approach (i.e I can hardcode the rendering order if need to be). Just like the red tank in the top left:


Could anyone please help with this little challenge?

Thanks in advance for any infos or help.

Shader "FX/Silhouette"
{
	Properties
	{
		_SilhouetteColor ("Silhouette Color", Color) = (1,0,0,1)
	}

	SubShader
	{
		Tags{"Queue"="Geometry+1" "RenderType"="Opaque" }
		Pass
		{
			ZTest GEqual
			Cull Back
			ZWrite Off
			Lighting Off
			Fog { Mode off }		
			
			Color [_SilhouetteColor]
		}
	}
}

you have to add one more pass - diffuse for example if you need complex material and not only Silhouette