summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred/materialF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/materialF.glsl9
1 files changed, 2 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl
index 1880f0c870..ec1e49eeb4 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl
@@ -37,9 +37,7 @@
uniform float emissive_brightness; // fullbright flag, 1.0 == fullbright, 0.0 otherwise
uniform int sun_up_factor;
-vec4 applyWaterFogViewLinear(vec3 pos, vec4 color);
-
-vec3 atmosFragLightingLinear(vec3 l, vec3 additive, vec3 atten);
+vec4 applySkyAndWaterFog(vec3 pos, vec3 additive, vec3 atten, vec4 color);
vec3 scaleSoftClipFragLinear(vec3 l);
void calcAtmosphericVarsLinear(vec3 inPositionEye, vec3 norm, vec3 light_dir, out vec3 sunlit, out vec3 amblit, out vec3 atten, out vec3 additive);
void calcHalfVectors(vec3 lv, vec3 n, vec3 v, out vec3 h, out vec3 l, out float nh, out float nl, out float nv, out float vh, out float lightDist);
@@ -399,10 +397,7 @@ void main()
color += light;
- color.rgb = atmosFragLightingLinear(color.rgb, additive, atten);
-
- vec4 temp = applyWaterFogViewLinear(pos, vec4(color, 0.0));
- color = temp.rgb;
+ color.rgb = applySkyAndWaterFog(pos.xyz, additive, atten, vec4(color, 1.0)).rgb;
glare *= 1.0-emissive;
glare = min(glare, 1.0);