I found this code in flash 3d http://arieln.com/blog/2014/08/new-wireframe-rendering-using-ddx-and-ddy/ and i try below code,but not work, where is wrong: Code (CSharp): Shader "Hidden/wireframe" { Properties { } SubShader { Tags { "Queue"="Geometry" } // Cull back // Lighting Off ZWrite off //ZTest Always Fog { Mode Off } Blend One OneMinusSrcAlpha Pass { CGPROGRAM #pragma vertex vert #pragma fragment frag #pragma glsl #include "UnityCG.cginc" struct v2f { float4 pos : POSITION; float4 depth : TEXCOORD0; }; v2f vert( appdata_full v ) { v2f o; o.pos = mul(UNITY_MATRIX_MVP, v.vertex); return o; } half4 frag( v2f i ) : COLOR { float3 pos=i.pos; float3 a3=smoothstep(float3(0),fwidth(pos),pos); float4 enc=float4((1-min(min(a3.x,a3.y),a3.z).xxx),0)*0.5f; return enc; } ENDCG } } }