From 03bf727d9a5b8e667e935583afa7f6b6815b2fb9 Mon Sep 17 00:00:00 2001 From: wraitii Date: Mon, 19 Aug 2013 10:19:21 +0000 Subject: [PATCH] Fix deactivation of HQ waviness causing the specular effect to go crazy. This was SVN commit r13708. --- binaries/data/mods/public/shaders/glsl/water_high.fs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/binaries/data/mods/public/shaders/glsl/water_high.fs b/binaries/data/mods/public/shaders/glsl/water_high.fs index 318ce407f7..7c70b83414 100644 --- a/binaries/data/mods/public/shaders/glsl/water_high.fs +++ b/binaries/data/mods/public/shaders/glsl/water_high.fs @@ -132,6 +132,7 @@ void main() ndoth = dot( mix(vec3(0.0,1.0,0.0),n,clamp(wavyFactor * v.y * 8.0,0.05,1.0)) ,h); n = mix(vec3(0.0,1.0,0.0),n,wavyFactor); #else + ndoth = dot(vec3(0.0,1.0,0.0), h); n = vec3(0.0,1.0,0.0); #endif @@ -236,7 +237,11 @@ void main() reflColor = mix( (sunColor + vec3(0.565,0.843,0.961))/1.85, reflectionTint, reflectionTintStrength); #endif - specular = pow(ndoth, mix(50.0,450.0, v.y*2.0)) * sunColor * 1.5; + #if USE_NORMALS + specular = pow(ndoth, mix(50.0,450.0, v.y*2.0)) * sunColor * 1.5; + #else + specular = pow(ndoth, mix(50.0,450.0, v.y*2.0)) * sunColor * 1.5 * ww.r; + #endif losMod = texture2D(losMap, gl_TexCoord[3].st).a; losMod = losMod < 0.03 ? 0.0 : losMod;