How can we write to depth (and velocity) from a global shader?

Have you set the correct depthstencil state on your drawcall? See TStaticDepthStencilState and for example FPixelShaderUtils::AddFullscreenPass