From 16933b0ab9a8556467fba18790050f2d025d06a5 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Tue, 3 Sep 2019 15:57:49 -0700 Subject: SL-11543, SL-11443 Fix faullbright/emissive problems. --- .../app_settings/shaders/class1/deferred/materialF.glsl | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1/deferred/materialF.glsl') diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl index 023172c844..fafecd57cc 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl @@ -274,20 +274,16 @@ void main() #if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_EMISSIVE) final_color.a = diffuse_linear.a; #endif - final_color.a = max(final_color.a, emissive_brightness); -#if !defined(HAS_NORMAL_MAP) - final_color.a = 0.0f; -#endif + final_color.a = max(final_color.a, emissive_brightness); + vec4 final_normal = vec4(encode_normal(normalize(tnorm)), env_intensity, 0.0); vec4 final_specular = spec; + final_specular.a = specular_color.a; -#ifdef HAS_SPECULAR_MAP - final_specular.a *= norm.a; -#endif - vec4 final_normal = vec4(encode_normal(normalize(tnorm)), env_intensity, 0.0); -#ifdef HAS_SPECULAR_MAP +#if HAS_SPECULAR_MAP + final_specular.a *= norm.a; final_normal.z *= spec.a; #endif -- cgit v1.2.3