diff options
author | Rider Linden <rider@lindenlab.com> | 2018-10-19 22:28:26 +0000 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-10-19 22:28:26 +0000 |
commit | e0557054c23a26c3eccfa408cc91d2aba874850d (patch) | |
tree | a49a18d9140ad48ad4de44e0726904f1de34d69f /indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl | |
parent | 135720248c90d2f2d98f367151d16b516ed69b8a (diff) | |
parent | c06bd45df96c117172b83e7f8b2a8e03c5fd88e5 (diff) |
Merged in graham_linden/viewer-eep-graham (pull request #162)
SL-9928
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl | 14 |
1 files changed, 10 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 d174805cc0..7a6bcd53a1 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl @@ -124,16 +124,22 @@ void calcAtmospherics(vec3 inPositionEye) { //increase ambient when there are more clouds vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow * 0.5; - //haze color - setAdditiveColor( + vec3 additive = vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow) + tmpAmbient) + (haze_horizon * haze_weight) * (sunlight*(1.-cloud_shadow) * temp2.x - + tmpAmbient))); + + tmpAmbient)); + additive = normalize(additive); + + //haze color + //setAdditiveColor( + // 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)); + setAdditiveColor(additive * vec3(1.0 - exp(-temp2.z * distance_multiplier)) * 0.5); // vary_SunlitColor = vec3(0); // vary_AmblitColor = vec3(0); |