   exp2 fog
  I'm having trouble getting exp2 fog working in GLSL. When I set the fog factor linearly, it works fine:float z = gl_FragCoord.z / gl_FragCoord.w;float density = gl_Fog.density;float fog = (z / 100.0) * density;.. it works ok. But when I try to use exp2, 'fog' is always zero:const float LOG2 = 1.442695;float z = gl_FragCoord.z / gl_FragCoord.w;float density = gl_Fog.density;float fog = exp2( -density * density * z * z * LOG2 ); fog = clamp(fog, 0.0, 1.0);What am I doing wrong?   
  You would need to use exp, not exp2.exp2 is 2 to the power X.exp is the e number to the power X.   ;  Hmm, I didn't get an email when you replied, so I hadn't seen it until now.The example I'm working from multiplied by the LOG2 constant to work with exp2 instead of exp (performance reasons maybe? I dunno).Anyway, I removed that and tried using exp() instead - same result. No fog at all.   