diff options
author | Graham Linden <graham@lindenlab.com> | 2018-10-19 22:58:01 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-10-19 22:58:01 +0100 |
commit | c06bd45df96c117172b83e7f8b2a8e03c5fd88e5 (patch) | |
tree | d169e36002062d6de1219fb0cd0969bbe631d65c /indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl | |
parent | 75858d9f3ff1f6adae4e6b4c4726eecfc57d0e11 (diff) |
SL-9928
De-hackify WL additive to get better match between ALM and non-ALM rendering
without bringing back SL-1491 lens flare bug.
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); |