DOF with ShaderMaterials

I am trying to extend the depth of field 2 example to use custom ShaderMaterials rather than MeshPhongMaterials.

However, the focalDepth parameter of the BokehShader doesn’t seem to affect my scene. I am rendering a bunch of points in my scene. So in my vertexShader, I am using gl_PointSize = pointScale; to set the size of my points and in the fragment shader I am setting gl_FragColor = vec4(r, g, b, a);. Do I need write depth values in my fragment shader?

I assume somehow the depth values are not written correctly. How do I need to modify this example to get it working with ShaderMaterials?