diff options
| author | RunitaiLinden <davep@lindenlab.com> | 2023-11-16 16:46:12 -0600 |
|---|---|---|
| committer | RunitaiLinden <davep@lindenlab.com> | 2023-11-16 16:46:12 -0600 |
| commit | bdb53fd56d56c659941e7e63f83cefc366acef6d (patch) | |
| tree | 89a6744852e7df622df02477a54c977aa91783d7 /indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl | |
| parent | 361efcb9267f2c91f88198081bbe6ac2264766fd (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/class2/deferred/alphaF.glsl')
| -rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl index b63f3b60f9..07fa5cd01c 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl @@ -65,9 +65,7 @@ uniform vec3 light_diffuse[8]; void waterClip(vec3 pos); -#ifdef WATER_FOG -vec4 applyWaterFogViewLinear(vec3 pos, vec4 color, vec3 sunlit); -#endif +vec4 applyWaterFogViewLinear(vec3 pos, vec4 color); vec3 srgb_to_linear(vec3 c); vec3 linear_to_srgb(vec3 c); @@ -270,12 +268,6 @@ void main() color.rgb *= diffuse_linear.rgb; - color.rgb = atmosFragLightingLinear(color.rgb, additive, atten); - -#ifdef WATER_FOG - color = applyWaterFogViewLinear(pos.xyz, color, sunlit_linear); -#endif // WATER_FOG - vec4 light = vec4(0,0,0,0); #define LIGHT_LOOP(i) light.rgb += calcPointLightOrSpotLight(light_diffuse[i].rgb, diffuse_linear.rgb, pos.xyz, norm, light_position[i], light_direction[i].xyz, light_attenuation[i].x, light_attenuation[i].y, light_attenuation[i].z, light_attenuation[i].w); @@ -291,6 +283,10 @@ void main() // sum local light contrib in linear colorspace color.rgb += light.rgb; + color.rgb = atmosFragLightingLinear(color.rgb, additive, atten); + + color = applyWaterFogViewLinear(pos.xyz, color); + #endif // #else // FOR_IMPOSTOR #ifdef IS_HUD |
