diff options
author | Michael Pohoreski <ptolemy@lindenlab.com> | 2019-11-20 17:10:22 -0800 |
---|---|---|
committer | Michael Pohoreski <ptolemy@lindenlab.com> | 2019-11-20 17:10:22 -0800 |
commit | 4b205db468fd371dfe1bb30bb887e2ccbd7044ec (patch) | |
tree | 6d83efd5ebc0c2a462f33f1b385c5b415a93cb49 /indra/newview/app_settings | |
parent | 18eb8ac90ce409ba620f6fe8ff487e6195d9c3eb (diff) | |
parent | 24920de799c8e2dd26854923c7a10fc4a551dd5d (diff) |
Merged lindenlab/viewer-eep into default
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/materialF.glsl | 6 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class2/windlight/transportF.glsl | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl index fafecd57cc..9505f2eb74 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl @@ -277,13 +277,13 @@ void main() final_color.a = max(final_color.a, emissive_brightness); - vec4 final_normal = vec4(encode_normal(normalize(tnorm)), env_intensity, 0.0); + vec4 final_normal = vec4(abnormal, env_intensity, 0.0); vec4 final_specular = spec; final_specular.a = specular_color.a; -#if HAS_SPECULAR_MAP - final_specular.a *= norm.a; +#ifdef HAS_SPECULAR_MAP + final_specular.a *= norm.a; final_normal.z *= spec.a; #endif 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) |