UnlitAlpha with depth?

Hi.

I use this following shader for my mobile game.
http://wiki.unity3d.com/index.php?title=UnlitAlpha

Shader "UnlitAlpha"

    {
        Properties
        {
            _Color ("Main Color", Color) = (1,1,1,1)
            _MainTex ("Base (RGB) Trans. (Alpha)", 2D) = "white" { }
        }

        Category
        {
            ZWrite On
            Alphatest Greater 0.5
            Cull Off
            SubShader
            {
                Pass
                {
                    Lighting Off
                    SetTexture [_MainTex]
                    {
                        constantColor [_Color]
                        Combine texture * constant, texture * constant
                    }
                }
            }
        }
    }

My problem here is, that it has no depth. Can I add some depth like that?

I also saw this in the inspector:
PerformanceChecks.ShaderWithClipAndroid

Is this a problem on mobile device? I really don’t understand what this means.

Thanks a lot!

You’re not asking about depth, you’re asking about lighting. You need a shader that has lighting or your should paint lighting into your textures.

As for that warning, Alphatest, aka “Clip”, is very expensive on mobile devices and that shader is using Alphatest.

OK. I deleted the line 13:
Alphatest Greater 0.5

No warning anymore.

For the other things, I must look.

Thank you!