diff options
7 files changed, 17 insertions, 21 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index a090a7be32..def492c203 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -1189,7 +1189,7 @@ LLColor3 LLSettingsSky::getTotalDensity() const // this is used later for sunlight modulation at various altitudes LLColor3 LLSettingsSky::getLightAttenuation(F32 distance) const { - F32 density_multiplier = getDensityMultiplier(); + F32 density_multiplier = getDensityMultiplier() * 0.45f; LLColor3 blue_density = getBlueDensity(); F32 haze_density = getHazeDensity(); // Approximate line integral over requested distance @@ -1200,7 +1200,7 @@ LLColor3 LLSettingsSky::getLightAttenuation(F32 distance) const LLColor3 LLSettingsSky::getLightTransmittance() const { LLColor3 total_density = getTotalDensity(); - F32 density_multiplier = getDensityMultiplier(); + F32 density_multiplier = getDensityMultiplier() * 0.45f; // Transparency (-> density) from Beer's law LLColor3 transmittance = componentExp(total_density * -density_multiplier); return transmittance; diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl index 595efdf6fe..6ff97fd1e9 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl @@ -1,5 +1,5 @@ /** - * @file WLCloudsF.glsl + * @file class1\deferred\cloudsF.glsl * * $LicenseInfo:firstyear=2005&license=viewerlgpl$ * Second Life Viewer Source Code @@ -86,14 +86,14 @@ void main() vec2 disturbance2 = vec2(cloudNoise((uv1 + uv3) / 4.0f).x, cloudNoise((uv4 + uv2) / 8.0f).x) * cloud_variance * (1.0f - cloud_scale * 0.25f); // Offset texture coords - uv1 += cloud_pos_density1.xy;// + (disturbance * 0.02); //large texture, visible density + uv1 += cloud_pos_density1.xy + (disturbance * 0.02); //large texture, visible density uv2 += cloud_pos_density1.xy; //large texture, self shadow uv3 += cloud_pos_density2.xy; //small texture, visible density uv4 += cloud_pos_density2.xy; //small texture, self shadow float density_variance = min(1.0, (disturbance.x* 2.0 + disturbance.y* 2.0 + disturbance2.x + disturbance2.y)); - //cloudDensity *= 1.0 - (density_variance * density_variance); + cloudDensity *= 1.0 - (density_variance * density_variance); // Compute alpha1, the main cloud opacity @@ -104,8 +104,8 @@ void main() alpha1 = 1. - alpha1 * alpha1; alpha1 = 1. - alpha1 * alpha1; - //alpha1 *= altitude_blend_factor; - //alpha1 = clamp(alpha1, 0.0, 1.0); + alpha1 *= altitude_blend_factor; + alpha1 = clamp(alpha1, 0.0, 1.0); // Compute alpha2, for self shadowing effect // (1 - alpha2) will later be used as percentage of incoming sunlight @@ -120,11 +120,7 @@ void main() vec4 color; color = (cloudColorSun*(1.-alpha2) + cloudColorAmbient); color.rgb= max(vec3(0), color.rgb); - //color.rgb = linear_to_srgb(color.rgb); - -//alpha1 = 1.0; -//color.rgb = cloudColorAmbient.rgb; -color.rgb = vec3(1,0,1); + color.rgb *= 2.0; /// Gamma correct for WL (soft clip effect). frag_data[0] = vec4(scaleSoftClip(color.rgb), alpha1); diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl index 10425bb91f..f1eb1af90c 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl @@ -99,14 +99,14 @@ void main() vec4 temp2 = vec4(0.); vec4 blue_weight; vec4 haze_weight; - //vec4 sunlight = (sun_up_factor == 1) ? sunlight_color : moonlight_color; - vec4 sunlight = sunlight_color; + vec4 sunlight = (sun_up_factor == 1) ? sunlight_color : moonlight_color; vec4 light_atten; + float dens_mul = density_multiplier * 0.45; // Sunlight attenuation effect (hue and brightness) due to atmosphere // this is used later for sunlight modulation at various altitudes - light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y); + light_atten = (blue_density + vec4(haze_density * 0.25)) * (dens_mul * max_y); // Calculate relative weights temp1 = blue_density + haze_density; @@ -119,7 +119,7 @@ void main() sunlight *= exp( - light_atten * temp2.y); // Distance - temp2.z = Plen * density_multiplier; + temp2.z = Plen * dens_mul; // Transparency (-> temp1) // ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati @@ -138,7 +138,7 @@ void main() temp2.x = pow(temp2.x, glow.z); // glow.z should be negative, so we're doing a sort of (1 / "angle") function - //temp2.x *= sun_moon_glow_factor; + temp2.x *= sun_moon_glow_factor; // Add "minimum anti-solar illumination" temp2.x += .25; diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl index bee8e2dab5..4603c69f2a 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl @@ -87,7 +87,7 @@ void main() vec4 sunlight = (sun_up_factor == 1) ? sunlight_color : moonlight_color; vec4 light_atten; - float dens_mul = density_multiplier; + float dens_mul = density_multiplier * 0.45; // Sunlight attenuation effect (hue and brightness) due to atmosphere // this is used later for sunlight modulation at various altitudes diff --git a/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl index a8eb7102ed..bd0ca0a46e 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl @@ -117,7 +117,7 @@ void main() vec4 sunlight = (sun_up_factor == 1) ? sunlight_color : moonlight_color; vec4 light_atten; - float dens_mul = density_multiplier; + float dens_mul = density_multiplier * 0.45; // Sunlight attenuation effect (hue and brightness) due to atmosphere // this is used later for sunlight modulation at various altitudes diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl index 5c5cd0294a..43500bc5e3 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl @@ -103,7 +103,7 @@ void main() vec4 sunlight = (sun_up_factor == 1) ? sunlight_color : moonlight_color; vec4 light_atten; - float dens_mul = density_multiplier; + float dens_mul = density_multiplier * 0.45; // Sunlight attenuation effect (hue and brightness) due to atmosphere // this is used later for sunlight modulation at various altitudes diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl index 6d6b3dafa7..f6bef3e6bc 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl @@ -87,7 +87,7 @@ void main() vec4 sunlight = (sun_up_factor == 1) ? sunlight_color : moonlight_color; vec4 light_atten; - float dens_mul = density_multiplier; + float dens_mul = density_multiplier * 0.45; // Sunlight attenuation effect (hue and brightness) due to atmosphere // this is used later for sunlight modulation at various altitudes |