summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-05-10 20:36:45 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2011-05-10 20:36:45 +0200
commit0ad016d39848584f51df9d2464b6aef5ab31485a (patch)
treec867723ec32e1eba5c5846a1f936c3ec3b2b6f73
parent7d93cab1eb1629b068858a68ac5e5840fe84a83a (diff)
Adjusted fog function.
-rw-r--r--shaders/terrain_fragment.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/shaders/terrain_fragment.glsl b/shaders/terrain_fragment.glsl
index c3f0d46..aa2de9b 100644
--- a/shaders/terrain_fragment.glsl
+++ b/shaders/terrain_fragment.glsl
@@ -27,7 +27,7 @@ void main() {
vec2 st = vec2((pos.x + 1 - selpos.x) / 2, (pos.z + 1 - selpos.z) / 2);
gl_FragColor += texture2D(marktex, st);
}
- gl_FragColor = mix(gl_FragColor, gl_Fog.color, pow(length(player_pos - pos), 2) / 10000);
+ gl_FragColor = mix(gl_FragColor, gl_Fog.color, pow(length(player_pos - pos)/100, 5));
}
/* vim: set syn=glsl: */