Here is a version of the shader that implements exponential fog:
Code:
uniform sampler2D BaseTexture;
uniform sampler2D DetailTexture;
const float LOG2E = 1.442695;
void main (void)
{
float fog = exp2(gl_Fog.density * gl_FogFragCoord * LOG2E);
fog = clamp(fog, 0.0, 1.0);
vec4 textureColor = (texture2D(BaseTexture, gl_TexCoord[0].xy) *
texture2D(DetailTexture, gl_TexCoord[1].xy).r) * 2.0;
gl_FragColor = vec4(mix( vec3(gl_Fog.color), vec3(textureColor),
fog), textureColor.a);
}
Did you try not applying the shader at all to fix the brightness problem?
Do you have any links explaining fractal animated layered fog, a quick google search didn't find anything.
The following page has an example that creates a moving cloud plane. I'm not sure if this is what you are looking for, but it might be useful.
http://www.worldviz.com/forum/showthread.php?t=549