diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-05-15 11:01:24 -0500 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2023-05-15 11:01:24 -0500 |
commit | cdc9852f052d804f8b25564ab7d90eb2b79cddd4 (patch) | |
tree | 1aab4d69fb7e85c814b1c77895b039348269e522 /indra/newview/app_settings/shaders/class1/deferred | |
parent | e3f9244375e3ddfb96a38afac007f0a5a68d3b46 (diff) |
SL-19709 Fix for fullbright shiny not factoring out exposure and flickering fullbright alpha. Incidental decruft.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred')
3 files changed, 14 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl b/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl index 3c51a8e44c..c8d6e395a3 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl @@ -29,8 +29,6 @@ out vec4 frag_color; -vec3 fullbrightAtmosTransport(vec3 light); - VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl index 5515d8e2a3..631ffc9625 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl @@ -45,7 +45,8 @@ vec3 srgb_to_linear(vec3 cs); vec3 legacy_adjust_fullbright(vec3 c); vec3 legacy_adjust(vec3 c); vec3 linear_to_srgb(vec3 cl); -vec3 fullbrightAtmosTransport(vec3 light); +vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten); +void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten, bool use_ao); #ifdef HAS_ALPHA_MASK uniform float minimum_alpha; @@ -79,8 +80,18 @@ void main() color.rgb *= vertex_color.rgb; -#ifdef WATER_FOG vec3 pos = vary_position; + +#ifndef IS_HUD + vec3 sunlit; + vec3 amblit; + vec3 additive; + vec3 atten; + calcAtmosphericVars(pos.xyz, vec3(0), 1.0, sunlit, amblit, additive, atten, false); +#endif + +#ifdef WATER_FOG + vec4 fogged = applyWaterFogView(pos, vec4(color.rgb, final_alpha)); color.rgb = fogged.rgb; color.a = fogged.a; @@ -92,7 +103,7 @@ void main() color.rgb = legacy_adjust(color.rgb); color.rgb = srgb_to_linear(color.rgb); color.rgb = legacy_adjust_fullbright(color.rgb); - color.rgb = fullbrightAtmosTransport(color.rgb); + color.rgb = atmosFragLighting(color.rgb, additive, atten); #endif frag_color = max(color, vec4(0)); diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl index 406a7ef3b3..370aa75d04 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl @@ -23,8 +23,6 @@ * $/LicenseInfo$ */ -/*[EXTRA_CODE_HERE]*/ - out vec4 frag_color; void main() |