Fragment Shader with Standart Fog

hello,

i have a little question about the fragmentshader with jogl
(i only use frag shader without vertex shader(thats another story))

the frag shader works well, but i miss the build-in Fog function

i try something like this …but it looks not very good

...
float fog_amount =  gl_FogFragCoord*-0.004;
vec3 farbe= mix(  texel.rgb  , vec3(fog_color_r,fog_color_g,fog_color_b) , fog_amount )  ;
gl_FragColor = vec4 (farbe,1.0)*gl_Color;

got anybody an idea?

much thx