diff options
author | Dave Parks <davep@lindenlab.com> | 2022-09-23 10:42:09 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-09-23 10:42:09 -0500 |
commit | 01d667109159666150816ff728fa941d2fb54299 (patch) | |
tree | 7208dc7bce1aba92f2dd9506bb91c2f29d430192 /indra/newview/app_settings/shaders | |
parent | 43822fa6e4ccb2e41a33cb39fff756572b0fde0b (diff) |
SL-18120 Fix for specular color of legacy materials tinting environment reflections from "environment" intensity.
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl index beb0f6f2a6..73b852e008 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl @@ -506,20 +506,6 @@ vec3 sampleProbeAmbient(vec3 pos, vec3 dir) return col; } -// brighten a color so that at least one component is 1 -vec3 brighten(vec3 c) -{ - float m = max(max(c.r, c.g), c.b); - - if (m == 0) - { - return vec3(1,1,1); - } - - return c * 1.0/m; -} - - void sampleReflectionProbes(inout vec3 ambenv, inout vec3 glossenv, vec3 pos, vec3 norm, float glossiness) { @@ -581,7 +567,7 @@ void applyGlossEnv(inout vec3 color, vec3 glossenv, vec4 spec, vec3 pos, vec3 no float fresnel = 1.0+dot(lookAt, norm.xyz); fresnel *= fresnel; fresnel = min(fresnel+envIntensity, 1.0); - reflected_color *= (envIntensity*fresnel)*brighten(spec.rgb); + reflected_color *= (envIntensity*fresnel); color = mix(color.rgb, reflected_color, envIntensity); } |