summaryrefslogtreecommitdiff
path: root/client/shaders/water_surface_shader/opengl_fragment.glsl
diff options
context:
space:
mode:
authorRealBadAngel <maciej.kasatkin@o2.pl>2014-06-16 18:51:01 +0200
committerRealBadAngel <maciej.kasatkin@o2.pl>2014-06-17 00:56:17 +0200
commita0f78659f31abdce973bc6641b5b5a58f2ba9afc (patch)
tree61aafd24c4a46a6fa74343489de77b8a6a3e5af0 /client/shaders/water_surface_shader/opengl_fragment.glsl
parent9f46cb6745a03f3a435a5a1f8a28a778971f3668 (diff)
downloadminetest-a0f78659f31abdce973bc6641b5b5a58f2ba9afc.tar.gz
minetest-a0f78659f31abdce973bc6641b5b5a58f2ba9afc.tar.bz2
minetest-a0f78659f31abdce973bc6641b5b5a58f2ba9afc.zip
Improved faces shading with and without shaders.
Diffstat (limited to 'client/shaders/water_surface_shader/opengl_fragment.glsl')
-rw-r--r--client/shaders/water_surface_shader/opengl_fragment.glsl12
1 files changed, 0 insertions, 12 deletions
diff --git a/client/shaders/water_surface_shader/opengl_fragment.glsl b/client/shaders/water_surface_shader/opengl_fragment.glsl
index 351faf81b..2a1cbc568 100644
--- a/client/shaders/water_surface_shader/opengl_fragment.glsl
+++ b/client/shaders/water_surface_shader/opengl_fragment.glsl
@@ -99,12 +99,6 @@ vec4 base = texture2D(baseTexture, uv).rgba;
float alpha = gl_Color.a;
vec4 col = vec4(color.rgb, alpha);
col *= gl_Color;
- col = col * col; // SRGB -> Linear
- col *= 1.8;
- col.r = 1.0 - exp(1.0 - col.r) / e;
- col.g = 1.0 - exp(1.0 - col.g) / e;
- col.b = 1.0 - exp(1.0 - col.b) / e;
- col = sqrt(col); // Linear -> SRGB
if(fogDistance != 0.0){
float d = max(0.0, min(vPosition.z / fogDistance * 1.5 - 0.6, 1.0));
alpha = mix(alpha, 0.0, d);
@@ -113,12 +107,6 @@ vec4 base = texture2D(baseTexture, uv).rgba;
#else
vec4 col = vec4(color.rgb, base.a);
col *= gl_Color;
- col = col * col; // SRGB -> Linear
- col *= 1.8;
- col.r = 1.0 - exp(1.0 - col.r) / e;
- col.g = 1.0 - exp(1.0 - col.g) / e;
- col.b = 1.0 - exp(1.0 - col.b) / e;
- col = sqrt(col); // Linear -> SRGB
if(fogDistance != 0.0){
float d = max(0.0, min(vPosition.z / fogDistance * 1.5 - 0.6, 1.0));
col = mix(col, skyBgColor, d);