I am currently trying to sample the _CameraDepthTexture and it all seems to be okay (although there seems to be several ways of actually doing it), however I have noticed that when an object has one of my custom shaders on the material, the object does not seem to be written to the depth buffer. This means I am unable to sample that pixel from the depth buffer and gain its world position. So I was wondering whether there was something I needed to do in a vertex/fragment shader that means the object should still write to the depth buffer. I have tried to take a look around and found the documentation on ZWrite: which sounds like by default my shader should be writing to the depth buffer. When using one of the built-in surface shaders the depth seems to work fine.