Depth texture not working on some devices

I try to just show the Depth Texture in a post effect, on most devices it’s working, but on some devices like HTC One I get only a black texture. Is there another reason than the shader that this is not working on some devices?

Thanks!

Shader code:

Pass{
   
        Tags{
            "Queue"="Geometry"
            "IgnoreProjector"="True"
            "RenderType"="Opaque"
        }
       
        //cull Off
       
        CGPROGRAM
        #pragma vertex vert
        #pragma fragment frag
        #pragma fragmentoption ARB_precision_hint_fastest
        #include "unityCG.cginc"
       
        sampler2D _CameraDepthTexture;
        half4 _MainTex_TexelSize;
        float4 _CurveParams;

        struct vertexInput{
            float4 texcoord : TEXCOORD0;
            float4 vertex : POSITION;
        };
       
        struct vertexOutput{
            float4 pos : SV_POSITION;
            float4 texcoord : TEXCOORD0;
        };
       
        vertexOutput vert(vertexInput v) {
            vertexOutput o;
           
            o.pos = mul(UNITY_MATRIX_MVP,v.vertex);
            o.texcoord.xy = v.texcoord.xy;
  
            #if UNITY_UV_STARTS_AT_TOP
            if (_MainTex_TexelSize.y < 0)
                o.texcoord.xy = o.texcoord.xy * half2(1,-1)+half2(0,1);
            #endif
            return o;
        }
       
       
        fixed4 frag(vertexOutput i) : SV_Target
        {           
            float depth = UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture, i.texcoord));
            depth         = Linear01Depth(depth);

               
            return saturate(depth);   
        }
       
        ENDCG
   
   
    }

So, I made my own Depth Texture with a renderWithShader camera. it’s working if I set my renderTexture format to ARGB32 however I see a lot of texture banding. All other texture formats will render all white on the device but is fine in the editor.

I think I found the solution. When I render my depth texture manually ( same way unity does it ) it doesn’t work. However, if I set my RenderTexture Depth format to 16 bits instead of 24 bits it’s working!

Makes me think that’s the issue with DepthTextureMode.Depth, probably rendering in 24bits.

I’m gonna leave this here after days of struggle: If nothing worked, trying using RenderTextureFormat.Shadowmap.