summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2023-11-16 16:46:12 -0600
committerRunitaiLinden <davep@lindenlab.com>2023-11-16 16:46:12 -0600
commitbdb53fd56d56c659941e7e63f83cefc366acef6d (patch)
tree89a6744852e7df622df02477a54c977aa91783d7 /indra/newview/app_settings/shaders/class1/deferred
parent361efcb9267f2c91f88198081bbe6ac2264766fd (diff)
SL-20611 Make haze effect local lights -- move sky and water haze to their own passes and unify sky and water haze in forward rendering shaders.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl16
1 files changed, 5 insertions, 11 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..2798c59f1c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
@@ -35,9 +35,7 @@ in vec3 vary_position;
in vec4 vertex_color;
in vec2 vary_texcoord0;
-#ifdef WATER_FOG
-vec4 applyWaterFogView(vec3 pos, vec4 color);
-#endif
+vec4 applyWaterFogViewLinear(vec3 pos, vec4 color);
vec3 srgb_to_linear(vec3 cs);
vec3 linear_to_srgb(vec3 cl);
@@ -86,18 +84,14 @@ void main()
calcAtmosphericVars(pos.xyz, vec3(0), 1.0, sunlit, amblit, additive, atten);
#endif
-#ifdef WATER_FOG
-
- 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);
+
+ vec4 fogged = applyWaterFogViewLinear(pos, vec4(color.rgb, final_alpha));
+ color.rgb = fogged.rgb;
+ color.a = fogged.a;
#endif
frag_color = max(color, vec4(0));