summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDave Houlton <euclid@lindenlab.com>2019-11-19 12:15:45 -0700
committerDave Houlton <euclid@lindenlab.com>2019-11-19 12:15:45 -0700
commit24920de799c8e2dd26854923c7a10fc4a551dd5d (patch)
tree7fc507e8f53cc4a876ba4230bd51be5efc9213cb /indra/newview
parentcf9014602df4efb863053acd24cfdabf3338b6ba (diff)
SL-11055 Add back pre-EEP fog burnthrough for fullbrights
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/transportF.glsl9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
index d2d839ed05..a06f4f22ad 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
@@ -51,7 +51,14 @@ vec3 atmosTransport(vec3 light)
vec3 fullbrightAtmosTransport(vec3 light)
{
float brightness = dot(light.rgb * 0.5, vec3(0.3333)) + 0.1;
- return atmosTransportFrag(light * 0.5, getAdditiveColor() * brightness, getAtmosAttenuation());
+ 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);
}
vec3 fullbrightShinyAtmosTransport(vec3 light)