diff options
author | Graham Linden <graham@lindenlab.com> | 2019-04-23 15:12:49 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-04-23 15:12:49 -0700 |
commit | 3c13779e67841147d2cdcb77e73db2ce9b011cc6 (patch) | |
tree | da33904520c9788da6f63076237c805ccfa7c95b | |
parent | a685e024a62751289ccfa41c962b039d1de748bd (diff) |
SL-10946
Limit influence of refraction scale to avoid pulling in lots of background 'deep blue' pixels never written in the distortion map pass.
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/waterF.glsl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl index e0af521511..e72b36f28a 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl @@ -144,13 +144,14 @@ void main() refcol = mix(baseCol*df2, refcol, dweight); //figure out distortion vector (ripply) - vec2 distort2 = distort+wavef.xy*refScale * 0.33/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 an nvidia compiler bug - color.rgb = mix(fb.rgb, refcol.rgb, df1 * 0.99999); - + color.rgb = fb.rgb; + color.rgb += refcol.rgb * df1; + vec4 pos = vary_position; vec3 screenspacewavef = normalize((norm_mat*vec4(wavef, 1.0)).xyz); |