summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pohoreski <ptolemy@lindenlab.com>2020-01-30 19:55:05 +0000
committerMichael Pohoreski <ptolemy@lindenlab.com>2020-01-30 19:55:05 +0000
commit01770f3ce32767a62a6920646a9a4e3906fecc59 (patch)
tree7a45beb0f22dfcf372e7834800fd55c6c3e32406
parenteaf83ea9c7eef663456507c32b0c1511ab69d157 (diff)
parent8545b81a32e1f8a7621ca7e136a5899545a5788b (diff)
Merged in SL-11406 (pull request #2)
SL-11406: Fix specularity being blown out due to previous fix Approved-by: Dave Houlton <euclid@lindenlab.com>
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/materialF.glsl9
1 files changed, 3 insertions, 6 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
index 8ed5713e22..8a6b2b7066 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
@@ -290,9 +290,7 @@ void main()
// OR
// adjust the final color via:
// final_color *= 0.666666;
- // We remap the environment intensity to closely simulate what non-EEP is doing.
- // At midnight the brightness is exact.
- // At midday the brightness is very close.
+ // We don't remap the environment intensity but adjust the final color to closely simulate what non-EEP is doing.
vec4 final_normal = vec4(abnormal, env_intensity, 0.0);
vec3 color = vec3(0.0);
@@ -301,9 +299,8 @@ void main()
if (emissive_brightness >= 1.0)
{
#ifdef HAS_SPECULAR_MAP
- float ei = env_intensity*0.5 + 0.5;
- final_normal = vec4(abnormal, ei, 0.0);
-
+ // Note: We actually need to adjust all 4 channels not just .rgb
+ final_color *= 0.666666;
#endif
color.rgb = final_color.rgb;
al = vertex_color.a;