diff options
author | Graham Linden <graham@lindenlab.com> | 2019-05-17 14:21:52 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-05-17 14:21:52 -0700 |
commit | c8ae0c0c3f1747faf36d27a63c66755a1bfeeb3c (patch) | |
tree | d710ca558ccaea9bd72faea4f6963d8cc7aa4fe7 /indra/newview/app_settings/shaders/class1/environment | |
parent | b3c0218a31b9d7dd699cf3944bbcfc35e9adbd49 (diff) |
SL-11112
Fix blend between reflected/refracted water maps (make less transparent)
and fix setting of water fog color alpha on low end to better match
prev behavior of setting the internal control value in that case.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/environment')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/environment/waterF.glsl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl index a4e3f94816..043815c824 100644 --- a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl +++ b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl @@ -121,7 +121,8 @@ void main() vec4 refcol = refcol1 + refcol2 + refcol3; float df1 = df.x + df.y + df.z; - refcol *= df1 * 0.333; + df1 *= 0.3333; + refcol *= df1; vec3 wavef = (wave1 + wave2 * 0.4 + wave3 * 0.6) * 0.5; @@ -144,13 +145,13 @@ void main() spec = pow(spec, 128.0); //figure out distortion vector (ripply) - vec2 distort2 = distort+wavef.xy*refScale/max(dmod*df1, 1.0); + vec2 distort2 = distort+wavef.xy*(refScale*0.01)/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 and nvidia compiler bug - color.rgb = mix(fb.rgb, refcol.rgb, df1 * 0.99999); + color.rgb = mix(fb.rgb, refcol.rgb, df1 + 0.6); color.rgb += spec * specular; color.rgb = atmosTransport(color.rgb); |