diff options
Diffstat (limited to 'indra/newview/app_settings/shaders')
4 files changed, 11 insertions, 5 deletions
| diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index 251ec7d785..fdbf5ec840 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -118,7 +118,7 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 diffuse, vec3 v, vec3 n, vec          float amb_da = ambiance;          amb_da *= dist_atten;          amb_da += (da*0.5) * ambiance; -        amb_da += (da*da*0.5 + 0.5) * ambiance; +        amb_da += (da*da*0.5 + 0.25) * ambiance;          amb_da = min(amb_da, 1.0f - lit);          col.rgb += amb_da * light_col * diffuse; @@ -228,7 +228,6 @@ void main()      color.rgb += light.rgb;      color.rgb = linear_to_srgb(color.rgb); -  #endif  #ifdef WATER_FOG diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl index 76c1fc7cf4..ae2dd24b19 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl @@ -112,7 +112,6 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 npos, vec3 diffuse, vec4 spe          //angular attenuation          da = dot(n, lv);          da *= clamp(da, 0.0, 1.0); -        da *= pow(da, 1.0 / 1.3);          float lit = max(da * dist_atten, 0.0); diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl index 565c00ba79..14af657e67 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl @@ -96,7 +96,11 @@ void calcFragAtmospherics(vec3 inPositionEye, float ambFactor, out vec3 sunlit,      //(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain)      temp2.y = max(0.0, tmpLightnorm.y); -    temp2.y = 1. / temp2.y; +    if (temp2.y > 0.001f) +    { +        temp2.y = 1. / temp2.y; +    } +    temp2.y = max(0.001f, temp2.y);      sunlight *= exp(-light_atten * temp2.y);      // main atmospheric scattering line integral diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl index bef7a8827a..6c4098b9fb 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl @@ -91,7 +91,11 @@ void calcAtmospherics(vec3 inPositionEye) {      //(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain)      temp2.y = max(0.0, tmpLightnorm.y); -    temp2.y = 1. / temp2.y; +    if (temp2.y > 0.001f) +    { +        temp2.y = 1. / temp2.y; +    } +    temp2.y = max(0.001f, temp2.y);      sunlight *= exp( - light_atten * temp2.y);      // main atmospheric scattering line integral | 
