From bdb53fd56d56c659941e7e63f83cefc366acef6d Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Thu, 16 Nov 2023 16:46:12 -0600 Subject: 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. --- .../shaders/class1/deferred/fullbrightF.glsl | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1/deferred') 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)); -- cgit v1.2.3