From 5e84b7af3513851e52606a9c4610041ad1aec177 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 8 Jul 2019 13:23:43 -0700 Subject: Fix materials content being emissive when it should not. --- .../app_settings/shaders/class1/deferred/materialF.glsl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl index 72b1535332..4cbef89fef 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl @@ -272,14 +272,12 @@ void main() vec2 abnormal = encode_normal(norm.xyz); - vec4 final_color = diffuse_linear; + vec4 final_color = vec4(diffuse_linear.rgb, 0.0); -#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 +#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_EMISSIVE) + final_color.a = diffuse_linear.a; #endif + final_color.a = max(final_color.a, emissive_brightness); vec4 final_specular = spec; final_specular.a = specular_color.a; -- cgit v1.2.3