I have a depth map texture that I want to use as a depth offset per fragment, but it is giving me view dependent results. I tried gl_FragCoord.z plus offset, but it gave incorrect results. I read that the depth buffer is not linear or something? What would be the proper way to do this.