diff options
author | cosmic-linden <111533034+cosmic-linden@users.noreply.github.com> | 2023-12-04 16:44:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-04 16:44:40 -0800 |
commit | 1718fe5da2e19ddbe9a738eef273112632e5dd35 (patch) | |
tree | cb358e20947f6378a009c97103f878d8a79a3ff1 /indra/newview/app_settings/shaders/class1/deferred | |
parent | 4a8a3100a978989f246b7f837e8a45968908d27b (diff) | |
parent | 18f42a659b98741a9d8c05731a8137080c9094b5 (diff) |
Merge pull request #556 from secondlife/davep/SL-20611
SL-20611 Make haze effect local lights. Incidental fix for EventPump coroutine sometimes doing unsafe work mid-render.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl index 5d58cc91cd..8b2a69b924 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl @@ -35,21 +35,19 @@ in vec3 vary_position; in vec4 vertex_color; in vec2 vary_texcoord0; -#ifdef WATER_FOG -vec4 applyWaterFogView(vec3 pos, vec4 color); -#endif - vec3 srgb_to_linear(vec3 cs); vec3 linear_to_srgb(vec3 cl); -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); #ifdef HAS_ALPHA_MASK uniform float minimum_alpha; #endif #ifdef IS_ALPHA +uniform vec4 waterPlane; void waterClip(vec3 pos); +void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, + out vec3 atten); +vec4 applySkyAndWaterFog(vec3 pos, vec3 additive, vec3 atten, vec4 color); #endif void main() @@ -79,25 +77,20 @@ void main() vec3 pos = vary_position; #ifndef IS_HUD + color.rgb = srgb_to_linear(color.rgb); + color.a = final_alpha; +#ifdef IS_ALPHA + vec3 sunlit; vec3 amblit; vec3 additive; vec3 atten; calcAtmosphericVars(pos.xyz, vec3(0), 1.0, sunlit, amblit, additive, atten); -#endif -#ifdef WATER_FOG + color.rgb = applySkyAndWaterFog(pos, additive, atten, color).rgb; - vec4 fogged = applyWaterFogView(pos, vec4(color.rgb, final_alpha)); - color.rgb = fogged.rgb; - color.a = fogged.a; -#else - color.a = final_alpha; #endif -#ifndef IS_HUD - color.rgb = srgb_to_linear(color.rgb); - color.rgb = atmosFragLighting(color.rgb, additive, atten); #endif frag_color = max(color, vec4(0)); |