Code (CSharp): struct v2f { ... float2 uv : TEXCOORD0; } In vert: Code (CSharp): o.uv=v.texcoords; in frag: Code (CSharp): o.col.r = tex2D(_CameraDepthTexture, i.uv.xy); So red cube(in the image below) outputs depth as color red on his texture. But it is only 0 to 1, while it would seem like _CameraDepthTexture should have larger value, since I get depth<1(red<1) only when object is very close to the camera. And second question: I don't want to render depth texture as texture, I want shader to read from it before writing pixel to it. I want to read the depth value that will be replaced by this pixel. How do I do it? http://s9.postimg.org/mhlw2i0jj/F***eng_shiet.png