program: fix comment about the fog formula
authorMiklós Máté <mtmkls@gmail.com>
Tue, 15 Dec 2015 23:05:40 +0000 (00:05 +0100)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 17 Dec 2015 20:09:58 +0000 (12:09 -0800)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/program/prog_statevars.c

index bdb335e4ba3ab1c62b4f7c2581e406bb364f6d4a..12490d0c380d7aea96c830b2e8b45809c061d4bf 100644 (file)
@@ -474,7 +474,7 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[],
           * single MAD.
           * linear: fogcoord * -1/(end-start) + end/(end-start)
           * exp: 2^-(density/ln(2) * fogcoord)
-          * exp2: 2^-((density/(ln(2)^2) * fogcoord)^2)
+          * exp2: 2^-((density/(sqrt(ln(2))) * fogcoord)^2)
           */
          value[0] = (ctx->Fog.End == ctx->Fog.Start)
             ? 1.0f : (GLfloat)(-1.0F / (ctx->Fog.End - ctx->Fog.Start));