title: Fog Of War for Unity3D
body: <p>I've been experimenting a fog of war. I have been following this <a href="https://www.youtube.com/watch?v=PNAvNeOTnSE" rel="nofollow">tutorial</a> apparently this is unity 4 and I'm using unity 5, I'm currently getting this error:</p>
  
  <blockquote>
    <p>Surface shader vertex function 'vert' not found</p>
  </blockquote>
  
  <p>I read on the comment section on this youtube video, I followed them, but it gives me the error. Tried the original version(The one in the video) but it makes my plane a always underneath even though it's y axis is zero, and the main map's y axis is -10.</p>
  
  <p>btw here is my code for my shader:</p>
  
  <pre><code>Shader "Custom/FogOWarShader" {
  Properties {
      _Color ("Main Color", Color) = (1,1,1,1)
      _MainTex ("Base (RGB)", 2D) = "white" {}
  }
  SubShader {
      Tags { "RenderType"="Transparent" "LightMode"="ForwardBase" }
      Blend SrcAlpha  OneMinusSrcAlpha
      Lighting Off
      LOD 200
  
      CGPROGRAM
  
      //#pragma surface surf NoLighting Lambert alpha:blend --the one that makes the map always on top
      #pragma surface surf Lambert vertex:vert alpha:blend
  
      fixed4 LightingNoLighting(SurfaceOutput s, fixed3 lightDir, float aten){
  
          fixed4 color;
          color.rgb = s.Albedo;
          color.a = s.Alpha;
          return color;
  
      }
  
      fixed4 _Color;
      sampler2D _MainTex;
  
      struct Input {
          float2 uv_MainTex;
      };
  
  
      void surf (Input IN, inout SurfaceOutput o) {
  
          half4 baseColor = tex2D (_MainTex, IN.uv_MainTex);
          o.Albedo = _Color.rgb * baseColor.b;
          o.Alpha = _Color.a - baseColor.g;
          }
          ENDCG
      } 
      FallBack "Diffuse"
  }
  </code></pre>