summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/windlight/skyV.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/skyV.glsl8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
index 3788ddaf2d..a65cc09c73 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
@@ -39,6 +39,8 @@ uniform vec3 camPosLocal;
uniform vec4 lightnorm;
uniform vec4 sunlight_color;
+uniform vec4 moonlight_color;
+uniform int sun_up_factor;
uniform vec4 ambient;
uniform vec4 blue_horizon;
uniform vec4 blue_density;
@@ -50,7 +52,7 @@ uniform float density_multiplier;
uniform float max_y;
uniform vec4 glow;
-
+uniform float sun_moon_glow_factor;
uniform vec4 cloud_color;
void main()
@@ -82,7 +84,7 @@ void main()
vec4 temp2 = vec4(0.);
vec4 blue_weight;
vec4 haze_weight;
- vec4 sunlight = sunlight_color;
+ vec4 sunlight = (sun_up_factor == 1) ? sunlight_color : moonlight_color;
vec4 light_atten;
// Sunlight attenuation effect (hue and brightness) due to atmosphere
@@ -119,6 +121,8 @@ void main()
temp2.x = pow(temp2.x, glow.z);
// glow.z should be negative, so we're doing a sort of (1 / "angle") function
+ temp2.x *= sun_moon_glow_factor;
+
// Add "minimum anti-solar illumination"
temp2.x += .25;