From 9f2148cc1f2469a1f45f8f3f736251a0300d1d6a Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 5 Jul 2019 11:21:45 -0700 Subject: SL-11552 Fix materialF including debug force to linear color and re-add logic to stomp emissiveness when normals are not present unless explicitly requested via diffuse alpha mode. --- .../app_settings/shaders/class1/deferred/materialF.glsl | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl index a8cac3e5a9..72b1535332 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl @@ -25,7 +25,7 @@ /*[EXTRA_CODE_HERE]*/ -#define DIFFUSE_ALPHA_MODE_IGNORE 0 +#define DIFFUSE_ALPHA_MODE_NONE 0 #define DIFFUSE_ALPHA_MODE_BLEND 1 #define DIFFUSE_ALPHA_MODE_MASK 2 #define DIFFUSE_ALPHA_MODE_EMISSIVE 3 @@ -274,10 +274,11 @@ void main() vec4 final_color = diffuse_linear; -#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_EMISSIVE) - // nop, use content of alpha emissive mask as is... -#else - final_color.a = emissive_brightness; +#if (DIFFUSE_ALPHA_MODE != DIFFUSE_ALPHA_MODE_EMISSIVE) + final_color.a = max(final_color.a, emissive_brightness); + #if !defined(HAS_NORMAL_MAP) + final_color.a = 0.0f; + #endif #endif vec4 final_specular = spec; @@ -455,8 +456,6 @@ 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. -- cgit v1.2.3