Depth shader on OpenGL?

i have a shader wich perfectly works on DirectX but have some issues on OpenGL (Android), what I need to fix ?

//fragment shader
//only depth operations				

UNITY_PROJ_COORD(i.screenPos);
				float4 finalColor = float4(1,1,1,1);

//get camera linear depth
				float planesDelta = _ProjectionParams.z - _ProjectionParams.y;

//this shader is designed for ortho camera so i getting value in range 1..0
//on Dx11, i tried 1 - value because opengl depth is non inveresed
//but this didn`t help
				float textureDepth = tex2Dproj(_CameraDepthTexture, i.screenPos).r * planesDelta;
				
				float currentPixelDepth = i.screenPos.z * planesDelta;
				float depthDelta = abs(textureDepth - currentPixelDepth);

work wersion

    				UNITY_PROJ_COORD(i.screenPos);
    				float4 finalColor = float4(1,1,1,1);
    				float planesDelta = _ProjectionParams.z - _ProjectionParams.y;
    
    				float textureDepth = tex2Dproj(_CameraDepthTexture, i.screenPos).r;

//range -1..1 to 0..1
    				float currentPixelDepth = (i.screenPos.z + 1) / 2;
    				float depthDelta = abs(textureDepth - currentPixelDepth) * planesDelta;