Cutout shader on android

Hi everyone!

I tried to find an answer but could not really find any useful.
I would like to use the built-in Transparent/Cutout/Diffuse shader to create a circular progress bar. I succeeded to do it and works perfectly in webplayer and standalone.

But on mobile (Samsung Galaxy S4) it is well almost working except that the texture is black. What are the options for cutout shaders on android?

Thank you forward!

You shall write a shader for the android. Unfortunately the platform the android doesn’t know shader operation as “discard”. Also the android badly works with alpha channel. I will write an example of a simple shader for a mobile device:

 Shader "Custom/CutoutMob" {
  Properties {
   _Color ("Main Color", Color) = (1,1,1,1)
   _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
   _Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
  }

  SubShader {
   Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
   LOD 200

   CGPROGRAM
   #pragma surface surf Lambert alpha noforwardadd

   sampler2D _MainTex;
   fixed4 _Color;
   float _Cutoff;

   struct Input {
    float2 uv_MainTex;
   };

   void surf (Input IN, inout SurfaceOutput o) {
    fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
    o.Albedo = c.rgb;
    if (c.a > _Cutoff)
     o.Alpha = c.a;
    else
     o.Alpha = 0;
   }
   ENDCG
  }

  Fallback "Diffuse"
 }

I hope that it will help you.