title: Custom shader not working on mobile phone (Unity)
body: <p>I have a custom shader and it doesn't work on my mobile device but works on the PC. How do I convert it so it works on a mobile device?</p>
  <p>Following is my code:</p>
  <pre><code>Shader &quot;vertexPainter/DiffuseNormalSpec_2tex_mask&quot; {
      Properties {
      _Color (&quot;Main Color&quot;, Color) = (1,1,1,1)
      _MainTex1 (&quot;Base 1 (RGBA)&quot;, 2D) = &quot;white&quot; {}
      _BumpMap1 (&quot;Bumpmap 1 (RGB)&quot;, 2D) = &quot;bump&quot; {}
  
      _MainTex2 (&quot;Base 2 (RGB)&quot;, 2D) =&quot;black&quot; {}
      _BumpMap2 (&quot;Bumpmap 2 (RGB)&quot;, 2D) = &quot;bump&quot; {}
      _BlendMask (&quot;Blend Mask&quot;, 2D) = &quot;white&quot; {}
  
      _Shininess(&quot;shininess&quot;, Range(0,0.8)) = 0.1
      _SpecColor(&quot;spec color&quot;, Color) = (0,0,0,0)
      _BlendSoft(&quot;Blend Softness&quot;, Range(0,0.8)) = 0.1
      _B_Normal(&quot;B Normal&quot;, Range(0,0.8)) = 0.1
      }
      SubShader {
      Tags { &quot;RenderType&quot;=&quot;Opaque&quot; }
      LOD 600
  
      CGPROGRAM
      #pragma surface surf BlinnPhong vertex:vert
      #pragma target 3.0
      struct Input {
      float2 uv_MainTex1 : TEXCOORD0;
      float2 uv2_BlendMask : TEXCOORD1;
      float4 color : COLOR;
      };
      void vert (inout appdata_full v, out Input o) {
      UNITY_INITIALIZE_OUTPUT(Input,o); 
      o.color = (v.color);
      }
      uniform sampler2D _MainTex1, _MainTex2, _BlendMask;
      uniform sampler2D _BumpMap1, _BumpMap2;
      half3 _SelfIllum;
      half _BlendSoft, _B_Normal;
      fixed _Shininess;
      void surf (Input IN, inout SurfaceOutput o) {
  
      half4 base = tex2D(_MainTex1, IN.uv_MainTex1);
      half4 blend1 = tex2D(_MainTex2, IN.uv_MainTex1);
  
      half4 blendmask = tex2D(_BlendMask, IN.uv2_BlendMask);
      half transformed = ((1 - IN.color.g) - blendmask.r)/_BlendSoft;
  
      half mask = saturate(transformed); 
      half4 finresult = lerp(blend1, base, mask); 
      half specresultg = lerp(blend1.a, base.a, mask); 
  
      half3 g_normal = UnpackNormal(tex2D(_BumpMap2, IN.uv_MainTex1));
      g_normal *= 1-(blendmask.b * _B_Normal);
      half3 r_normal = UnpackNormal(tex2D(_BumpMap1, IN.uv_MainTex1));
      half3 norresultg = lerp(g_normal, r_normal, mask); 
  
      o.Albedo = finresult.rgb;
      o.Normal = norresultg;
      o.Alpha = 1;
      o.Specular = _Shininess;
      o.Gloss = specresultg * _SpecColor;
      }
      ENDCG
      }
  
      FallBack &quot;Diffuse&quot;
  }
  </code></pre>
  <p>Screenshots for the shader:</p>
  <p>This is what it looks like on my PC:</p>
  <p><a href="https://i.stack.imgur.com/1MDhu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1MDhu.png" alt="enter image description here" /></a></p>
  <p>This is what it looks like on my mobile:</p>
  <p><a href="https://i.stack.imgur.com/aYKHT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aYKHT.png" alt="enter image description here" /></a></p>
  <h1>Specifications</h1>
  <p>PC:
  OS: Windows 10 Pro 64-bit
  Processor : Intel(r) Core(TM) i7-6700 CPU @ 3.40 Ghz(8CPUs), ~3.4Ghz
  Memory: 16,384MB RAM
  Graphic Card: NVIDIA GeForce GTX 960</p>
  <p>Phone:
  Samsung Galaxy s7 but right now i'm using an emulator(Bluestack)</p>