From 360b3230bbfbda7988eee84a8ed04fa1696ca70a Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Wed, 22 May 2019 13:16:23 -0700 Subject: SL-11260 Make terrain underwater shader not try to light said terrain. Fix colorspace of reflected color in non-ALM shading. Tweak transparency of water further. --- .../newview/app_settings/shaders/class1/deferred/waterF.glsl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1/deferred/waterF.glsl') diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl index 0459b39bd9..2235ab12a4 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl @@ -153,24 +153,25 @@ void main() spec = pow(spec, 128.0); //figure out distortion vector (ripply) - vec2 distort2 = distort+wavef.xy*(refScale*0.01)/max(dmod*df1, 1.0); + vec2 distort2 = distort+wavef.xy*refScale/max(dmod*df1, 1.0); vec4 fb = texture2D(screenTex, distort2); //mix with reflection // Note we actually want to use just df1, but multiplying by 0.999999 gets around an nvidia compiler bug - color.rgb = mix(fb.rgb, refcol.rgb, df1 * 0.3 + 0.7); + color.rgb = mix(fb.rgb, refcol.rgb, df1 * 0.4 + 0.6); vec4 pos = vary_position; color.rgb += spec * specular; - color.rgb = atmosTransport(color.rgb); + //color.rgb = atmosTransport(color.rgb); color.rgb = scaleSoftClip(color.rgb); - color.a = spec * sunAngle2 * 0.88; + color.a = spec * sunAngle2; + vec3 screenspacewavef = normalize((norm_mat*vec4(wavef, 1.0)).xyz); - + frag_data[0] = vec4(color.rgb, color); // diffuse frag_data[1] = vec4(0); // speccolor, spec frag_data[2] = vec4(encode_normal(screenspacewavef.xyz*0.5+0.5), 0.05, 0);// normalxy, 0, 0 -- cgit v1.2.3