diff options
author | Dave Houlton <euclid@lindenlab.com> | 2019-12-09 22:40:42 +0000 |
---|---|---|
committer | Dave Houlton <euclid@lindenlab.com> | 2019-12-09 22:40:42 +0000 |
commit | 9872b8a1d0954cce2813f71166fa13978e283002 (patch) | |
tree | 18155b1230eaacc26a53db05b49570570b45af26 /indra | |
parent | a164daad74fc0c8729aac5601df23c0f5cb3c02c (diff) | |
parent | 020ffe1bd3bb428abc0219d808a6a032cb6c2aeb (diff) |
Merged in EuclidLinden/dh-viewer-eep (pull request #506)
SL-11055 Increase fullbright fog burnthrough
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/windlight/transportF.glsl | 14 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class3/windlight/transportF.glsl | 5 |
2 files changed, 7 insertions, 12 deletions
diff --git a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl index a06f4f22ad..8fc5d750e3 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl @@ -38,8 +38,9 @@ vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten) { return light * 2.0; } - light *= atten.r; - light += additive; + // fullbright responds minimally to atmos scatter effects + light *= min(15.0 * atten.r, 1.0); + light += (0.1 * additive); return light * 2.0; } @@ -51,14 +52,7 @@ vec3 atmosTransport(vec3 light) vec3 fullbrightAtmosTransport(vec3 light) { float brightness = dot(light.rgb * 0.5, vec3(0.3333)) + 0.1; - vec3 attenColor = atmosTransportFrag(light * 0.5, getAdditiveColor() * brightness, getAtmosAttenuation()); - - // attenColor is an accurate fog-attenuated result for any brightness - // But, the pre-EEP shader included a brightness-indexed lerp to a non-attenuated version - // of the color - effectively a fog 'burn-through' for very bright pixels. To more closely - // match the pre-EEP behavior, we'll also lerp to the pre-EEP color, based on overall brightness - float preEepBright = dot(light.rgb, vec3(0.3333)); - retun mix(attenColor, (light.rgb + getAdditiveColor().rgb) * (2.0 - preEepBright), preEepBright * preEepBright); + return atmosTransportFrag(light * 0.5, getAdditiveColor() * brightness, getAtmosAttenuation()); } vec3 fullbrightShinyAtmosTransport(vec3 light) diff --git a/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl index 08eb119510..18705f785f 100644 --- a/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl +++ b/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl @@ -38,8 +38,9 @@ vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten) { return light; } - light *= atten.r; - light += additive; + // fullbright responds minimally to atmos scatter effects + light *= min(15.0 * atten.r, 1.0); + light += (0.1 * additive); return light * 2.0; } |