I've found a number of posts stating that the fog fragment distance can easily be obtained using gl_Position.z or gl_FragCoord.z/gl_FragCoord.w.
The problem is this makes a boundary where the fog begins.
What I want to do is determine this distance based on player's position such that there is a radius of fog around the player.
For simplicity say I want fog to be interpolated based on a pixel's distance from (0, 0, 0) in world space. Only pixels within fog_end of this coordinate are visible.