summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl')
-rwxr-xr-xindra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl9
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
index da3d922017..8fd06c7e2f 100755
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
@@ -54,6 +54,7 @@ uniform float density_multiplier;
uniform float distance_multiplier;
uniform float max_y;
uniform vec4 glow;
+uniform float global_gamma;
void calcAtmospherics(vec3 inPositionEye) {
@@ -129,11 +130,11 @@ void calcAtmospherics(vec3 inPositionEye) {
vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow) + tmpAmbient)
+ (haze_horizon * haze_weight) * (sunlight*(1.-cloud_shadow) * temp2.x
+ tmpAmbient)));
-
+
//brightness of surface both sunlight and ambient
- setSunlitColor(vec3(sunlight * .5));
- setAmblitColor(vec3(tmpAmbient * .25));
- setAdditiveColor(getAdditiveColor() * vec3(1.0 - temp1));
+ setSunlitColor(pow(vec3(sunlight * .5), vec3(global_gamma)) * global_gamma);
+ setAmblitColor(pow(vec3(tmpAmbient * .25), vec3(global_gamma)) * global_gamma);
+ setAdditiveColor(pow(getAdditiveColor() * vec3(1.0 - temp1), vec3(global_gamma)) * global_gamma);
// vary_SunlitColor = vec3(0);
// vary_AmblitColor = vec3(0);