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/class2/windlight | |
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/class2/windlight')
3 files changed, 9 insertions, 9 deletions
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl index 94e776d51d..36703ea742 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl @@ -44,7 +44,6 @@ uniform mat3 ssao_effect_mat; uniform int no_atmo; uniform float sun_moon_glow_factor; -vec3 srgb_to_linear(vec3 c); vec3 scaleSoftClipFrag(vec3 light); vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten) diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl index e31bdf610c..1de919bf30 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl @@ -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,12 +104,12 @@ void main() alpha1 = 1. - alpha1 * alpha1; alpha1 = 1. - alpha1 * alpha1; - alpha1 *= altitude_blend_factor; + //alpha1 *= altitude_blend_factor; - if (alpha1 < 0.001f) - { - discard; - } + //if (alpha1 < 0.001f) + //{ + // discard; + //} // Compute alpha2, for self shadowing effect // (1 - alpha2) will later be used as percentage of incoming sunlight diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl index 64156bd3bf..5c5cd0294a 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl @@ -180,7 +180,8 @@ 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 /= max(0.001, cloud_scale); vary_texcoord0.xy += 0.5; vary_texcoord1 = vary_texcoord0; |