projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7279453
)
program: fix comment about the fog formula
author
Miklós Máté
<mtmkls@gmail.com>
Tue, 15 Dec 2015 23:05:40 +0000
(
00:05
+0100)
committer
Ian 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
patch
|
blob
|
history
diff --git
a/src/mesa/program/prog_statevars.c
b/src/mesa/program/prog_statevars.c
index bdb335e4ba3ab1c62b4f7c2581e406bb364f6d4a..12490d0c380d7aea96c830b2e8b45809c061d4bf 100644
(file)
--- a/
src/mesa/program/prog_statevars.c
+++ b/
src/mesa/program/prog_statevars.c
@@
-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));