diff options
author | Graham Linden <graham@lindenlab.com> | 2019-05-13 12:10:05 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-05-13 12:10:05 -0700 |
commit | 0412bfdd7248e7d5621469085b34dfea9c4589d4 (patch) | |
tree | 5f42a8d32baaab37e6d821c22342fa8ec28a7a2e /indra/newview/app_settings | |
parent | 5da1f812dc3262b057be66de945454a7c46f1f44 (diff) |
SL-11149
More shader tweaks to fullbright transport to get correct coloring while keeping fog fixes.
Diffstat (limited to 'indra/newview/app_settings')
4 files changed, 21 insertions, 12 deletions
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl index 4ac44feee5..d66983a951 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl @@ -22,8 +22,6 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ - - // VARYING param funcs void setSunlitColor(vec3 v); diff --git a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl index 2683b06e1b..2de708d94b 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl @@ -51,11 +51,11 @@ vec3 atmosTransport(vec3 light) vec3 fullbrightAtmosTransport(vec3 light) { float brightness = dot(light.rgb, vec3(0.33333)); - return atmosTransportFrag(light, getAdditiveColor() * (brightness * 0.5 + 0.5), getAtmosAttenuation()); + return atmosTransportFrag(light * 0.5, getAdditiveColor() * (brightness * 0.5 + 0.5), getAtmosAttenuation()); } vec3 fullbrightShinyAtmosTransport(vec3 light) { float brightness = dot(light.rgb, vec3(0.33333)); - return atmosTransportFrag(light, getAdditiveColor() * (brightness * 0.5 + 0.5), getAtmosAttenuation()); + return atmosTransportFrag(light * 0.5, getAdditiveColor() * (brightness * brightness), getAtmosAttenuation()); } diff --git a/indra/newview/app_settings/shaders/class3/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class3/windlight/atmosphericsF.glsl index c0a0d4782d..88dfa8a907 100644 --- a/indra/newview/app_settings/shaders/class3/windlight/atmosphericsF.glsl +++ b/indra/newview/app_settings/shaders/class3/windlight/atmosphericsF.glsl @@ -37,22 +37,29 @@ uniform vec4 blue_density; uniform float haze_horizon; uniform float haze_density; uniform float cloud_shadow; +uniform float density_multiplier; +uniform float distance_multiplier; uniform float max_y; uniform vec4 glow; uniform float scene_light_strength; uniform mat3 ssao_effect_mat; +uniform int no_atmo; +uniform float sun_moon_glow_factor; vec3 scaleSoftClipFrag(vec3 light); vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten) { - light *= atten.r; - light += additive; - return (2.0 * light); + if (no_atmo == 1) + { + return light; + } + light *= atten.r; + light += additive; + return light * 2.0; } vec3 atmosLighting(vec3 light) { return atmosFragLighting(light, getAdditiveColor(), getAtmosAttenuation()); } - diff --git a/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl index e7e56087ab..08eb119510 100644 --- a/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl +++ b/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl @@ -35,10 +35,12 @@ uniform int no_atmo; vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten) { if (no_atmo == 1) - { + { return light; } - return (light + additive) * atten * 2.0; + light *= atten.r; + light += additive; + return light * 2.0; } vec3 atmosTransport(vec3 light) @@ -48,10 +50,12 @@ vec3 atmosTransport(vec3 light) vec3 fullbrightAtmosTransport(vec3 light) { - return atmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation()); + float brightness = dot(light.rgb, vec3(0.33333)); + return atmosTransportFrag(light * 0.5, getAdditiveColor() * (brightness * 0.5 + 0.5), getAtmosAttenuation()); } vec3 fullbrightShinyAtmosTransport(vec3 light) { - return atmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation()); + float brightness = dot(light.rgb, vec3(0.33333)); + return atmosTransportFrag(light * 0.5, getAdditiveColor() * (brightness * brightness), getAtmosAttenuation()); } |