summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-07-03 10:04:05 -0700
committerGraham Linden <graham@lindenlab.com>2019-07-03 10:04:05 -0700
commit48f169423ba0c1da8ffe13fc8bc4cec76336d8fc (patch)
treeb98913a1c97fa68a5e7d892839c01b1db34c4e15 /indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
parent7e5000bb64ca8eea3fe188ebb7bccff3bdfa82e7 (diff)
SL-11545, SL-11543, SL-10625
Fix emissives without normal maps clobbering the alpha output in materialF. Modify glow size calc to get close to pre-EEP sun glow behavior (may require sky vert settings >= mid). Make bake ignore alpha readback for Intel until we can determine why their drivers now go boom.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/materialF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/materialF.glsl14
1 files changed, 6 insertions, 8 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
index a82af996a1..a8cac3e5a9 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
@@ -273,15 +273,11 @@ void main()
vec2 abnormal = encode_normal(norm.xyz);
vec4 final_color = diffuse_linear;
-
-#if (DIFFUSE_ALPHA_MODE != DIFFUSE_ALPHA_MODE_EMISSIVE)
- final_color.a = emissive_brightness;
-#else
- final_color.a = max(final_color.a, emissive_brightness);
-#endif
-#if !defined(HAS_NORMAL_MAP)
- final_color.a = 0.0f;
+#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_EMISSIVE)
+ // nop, use content of alpha emissive mask as is...
+#else
+ final_color.a = emissive_brightness;
#endif
vec4 final_specular = spec;
@@ -459,6 +455,8 @@ vec3 post_atmo = color.rgb;
#else
// deferred path
+
+final_color = diffuse_linear;
frag_data[0] = final_color;
frag_data[1] = final_specular; // XYZ = Specular color. W = Specular exponent.
frag_data[2] = final_normal; // XY = Normal. Z = Env. intensity.