grayscale shader on iOS turns black

hey everyone,

i’ve got a bit of a shader problem. Since i have no experience with shader-coding (or programing in general), i hope someone will be able to help me here.

It’s a simple grayscale shader, I got the code somewhere off the internet. Nothing special.It’s applied to a material and everything’s regular. The material is applied to a sprite.

alt text ← with default sprite shader
alt text ← on PC
alt text ← on iOS

Now on mac, or win, everythings normal and how it should be. Grayscaled. On my iPad otherwise, it’s just black. pure evil. I have no idea why.
Here’s the shader-code.

Shader "GrayscaleLolTransparent" {
    Properties {
        _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
        _EffectAmount ("Effect Amount", Range (0, 1)) = 1.0
    }
 
    SubShader {
        Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
        LOD 200
 
        CGPROGRAM
        #pragma surface surf Lambert alpha
 
            sampler2D _MainTex;
            uniform float _EffectAmount;            
 
            struct Input {
                float2 uv_MainTex;
            };
 
            void surf (Input IN, inout SurfaceOutput o) {
                half4 c = tex2D(_MainTex, IN.uv_MainTex);
                 o.Albedo = lerp(c.rgb, dot(c.rgb, float3(0.3, 0.6, 0.2)), _EffectAmount);
                o.Alpha = c.a;
            }
 
        ENDCG
    }
 
    Fallback "Transparent/VertexLit"
}

I haven’t found anything in the search function. Just hints, that it may be because of some GLES shader stuff… I don’t know.

Any help?

Thanks in advance!

cheers

yes. i used this code.
http://forum.unity3d.com/threads/222693-Sprite-Shader-with-GreyScale