diff options
author | Graham Linden <graham@lindenlab.com> | 2019-07-05 11:21:45 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-07-05 11:21:45 -0700 |
commit | 9f2148cc1f2469a1f45f8f3f736251a0300d1d6a (patch) | |
tree | 83034072ed2b94d03ae70c0ba6c9e1427a5425c1 | |
parent | 48f169423ba0c1da8ffe13fc8bc4cec76336d8fc (diff) |
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.
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/materialF.glsl | 13 |
1 files changed, 6 insertions, 7 deletions
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. |