diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/windlight')
-rw-r--r-- | indra/newview/app_settings/shaders/class3/windlight/atmosphericsF.glsl | 4 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class3/windlight/atmosphericsV.glsl | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class3/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class3/windlight/atmosphericsF.glsl index a1b67fc31e..852c2478bc 100644 --- a/indra/newview/app_settings/shaders/class3/windlight/atmosphericsF.glsl +++ b/indra/newview/app_settings/shaders/class3/windlight/atmosphericsF.glsl @@ -29,6 +29,8 @@ vec3 getAtmosAttenuation(); uniform vec4 gamma; 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; @@ -69,7 +71,7 @@ void calcFragAtmospherics(vec3 inPositionEye, float ambFactor, out vec3 sunlit, vec3 temp2 = vec3(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 diff --git a/indra/newview/app_settings/shaders/class3/windlight/atmosphericsV.glsl b/indra/newview/app_settings/shaders/class3/windlight/atmosphericsV.glsl index 3270c243a4..9bd75cf118 100644 --- a/indra/newview/app_settings/shaders/class3/windlight/atmosphericsV.glsl +++ b/indra/newview/app_settings/shaders/class3/windlight/atmosphericsV.glsl @@ -38,6 +38,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; @@ -63,7 +65,7 @@ void calcAtmospherics(vec3 inPositionEye) { vec3 temp2 = vec3(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 |