diff options
author | Graham Linden <graham@lindenlab.com> | 2019-05-02 13:49:35 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-05-02 13:49:35 -0700 |
commit | c4032528aff8ef1938e897ec583bbf25a3e713e1 (patch) | |
tree | 4addd3b6619e6e911898d09ef446d0d40ef8a73e /indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl | |
parent | 1ff876a961dc00b7f162054ea1a9fed79240bffc (diff) |
Roll back sRGB decode changes from contrib for now.
Fix direct light matching across alpha/blended-material/deferred.
Get diffuse lighting to match from Low to Ultra.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl index 61fd43f1ee..10425bb91f 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl @@ -78,7 +78,7 @@ void main() // Get relative position vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0); - altitude_blend_factor = (P.y > -4096.0) ? 1.0 : 1.0 - clamp(abs(P.y) / max_y, 0.0, 1.0); + altitude_blend_factor = (P.y > -4096.0) ? 1.0 : 1.0 - clamp(abs(P.y) / max_y, 0.0, 1.0); // Set altitude if (P.y > 0.) @@ -86,7 +86,6 @@ void main() P *= (max_y / P.y); } else - if (P.y <= 0.0) { P *= (-32000. / P.y); } @@ -100,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 = (sun_up_factor == 1) ? sunlight_color : moonlight_color; + vec4 sunlight = sunlight_color; vec4 light_atten; - float dens_mul = density_multiplier; // 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)) * (dens_mul * max_y); + light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y); // Calculate relative weights temp1 = blue_density + haze_density; @@ -120,13 +119,14 @@ void main() sunlight *= exp( - light_atten * temp2.y); // Distance - temp2.z = Plen * dens_mul; + temp2.z = Plen * density_multiplier; // Transparency (-> temp1) // ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati // compiler gets confused. temp1 = exp(-temp1 * temp2.z); + // Compute haze glow temp2.x = dot(Pn, lightnorm.xyz); temp2.x = 1. - temp2.x; @@ -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; @@ -179,7 +179,7 @@ void main() // Texture coords vary_texcoord0 = texcoord0; vary_texcoord0.xy -= 0.5; - vary_texcoord0.xy /= max(0.001, cloud_scale); + vary_texcoord0.xy /= cloud_scale; vary_texcoord0.xy += 0.5; vary_texcoord1 = vary_texcoord0; |