diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2020-06-29 18:17:50 -0700 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2020-06-29 18:22:29 -0700 |
commit | 9aaa03a0d2bb2bfd0290744451c898d3705239d3 (patch) | |
tree | 2069ec7c67b777176b65a8f098c3de256a55fcc5 /indra/newview/app_settings | |
parent | a2ea1aac043dcaa8a302de88a157662df4c47cb0 (diff) |
SL-9632 Fix Haze effecting HUD objects
Diffstat (limited to 'indra/newview/app_settings')
3 files changed, 28 insertions, 9 deletions
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl index ab8b617746..0bb48061e0 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl @@ -31,6 +31,9 @@ out vec4 frag_color; uniform float minimum_alpha; +// render_hud_attachments() -> HUD objects set LLShaderMgr::NO_ATMO; +uniform int no_atmo; + vec3 atmosLighting(vec3 light); vec3 scaleSoftClip(vec3 light); @@ -48,9 +51,12 @@ void default_lighting() color *= vertex_color; - color.rgb = atmosLighting(color.rgb); - - color.rgb = scaleSoftClip(color.rgb); + // SL-9632 HUDs are affected by Atmosphere + if (no_atmo == 0) + { + color.rgb = atmosLighting(color.rgb); + color.rgb = scaleSoftClip(color.rgb); + } frag_color = color; } diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl index 46390e4a0e..0fde2049d5 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl @@ -32,6 +32,9 @@ out vec4 frag_color; uniform float minimum_alpha; uniform float texture_gamma; +// render_hud_attachments() -> HUD objects set LLShaderMgr::NO_ATMO; used in LLDrawPoolAlpha::beginRenderPass() +uniform int no_atmo; + vec3 fullbrightAtmosTransport(vec3 light); vec3 fullbrightScaleSoftClip(vec3 light); @@ -50,9 +53,13 @@ void fullbright_lighting() color.rgb *= vertex_color.rgb; color.rgb = pow(color.rgb, vec3(texture_gamma)); - color.rgb = fullbrightAtmosTransport(color.rgb); - - color.rgb = fullbrightScaleSoftClip(color.rgb); + + // SL-9632 HUDs are affected by Atmosphere + if (no_atmo == 0) + { + color.rgb = fullbrightAtmosTransport(color.rgb); + color.rgb = fullbrightScaleSoftClip(color.rgb); + } frag_color = color; } diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl index b967709c57..5fcdf3107c 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl @@ -34,6 +34,9 @@ VARYING vec2 vary_texcoord0; uniform float texture_gamma; +// render_hud_attachments() -> HUD objects set LLShaderMgr::NO_ATMO; +uniform int no_atmo; + vec3 fullbrightAtmosTransport(vec3 light); vec3 fullbrightScaleSoftClip(vec3 light); @@ -43,9 +46,12 @@ void fullbright_lighting() color.rgb = pow(color.rgb, vec3(texture_gamma)); - color.rgb = fullbrightAtmosTransport(color.rgb); - - color.rgb = fullbrightScaleSoftClip(color.rgb); + // SL-9632 HUDs are affected by Atmosphere + if (no_atmo == 0) + { + color.rgb = fullbrightAtmosTransport(color.rgb); + color.rgb = fullbrightScaleSoftClip(color.rgb); + } color.rgb = pow(color.rgb, vec3(1.0/texture_gamma)); |