From f30a649f1cd789510b2f4e0b2b2f85043cdfd700 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 19 Apr 2019 08:26:03 -0700 Subject: SL-10967 All paths now use the same atmospheric transport calcs. --- .../shaders/class1/deferred/fullbrightF.glsl | 2 +- .../shaders/class1/deferred/softenLightF.glsl | 1 - .../shaders/class1/windlight/transportF.glsl | 12 ----------- .../shaders/class2/deferred/softenLightF.glsl | 2 -- .../shaders/class2/windlight/transportF.glsl | 23 ++------------------- .../shaders/class3/windlight/transportF.glsl | 24 ++-------------------- 6 files changed, 5 insertions(+), 59 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl index f98fc0d518..f8b1ff44c8 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl @@ -63,7 +63,7 @@ void main() float final_alpha = color.a * vertex_color.a; #ifdef HAS_ALPHA_MASK - if (color.a < minimum_alpha) + if (final_alpha < minimum_alpha) { discard; } diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl index 71fbe5df57..8d126859c3 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl @@ -69,7 +69,6 @@ vec4 applyWaterFogView(vec3 pos, vec4 color); vec3 getNorm(vec2 pos_screen); vec3 atmosFragLighting(vec3 l, vec3 additive, vec3 atten); -vec3 fullbrightAtmosTransportFrag(vec3 l, vec3 additive, vec3 atten); void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten); diff --git a/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl index e2b391cb7a..79d8d11b32 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl @@ -31,18 +31,6 @@ vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten) return light; } -vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten) -{ - /* stub function for fallback compatibility on class1 hardware */ - return light; -} - -vec3 fullbrightShinyAtmosTransportFrag(vec3 light, vec3 atten, vec3 additive) -{ - /* stub function for fallback compatibility on class1 hardware */ - return light; -} - vec3 atmosTransport(vec3 light) { /* stub function for fallback compatibility on class1 hardware */ diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl index 737fb0fef7..a1d1287825 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl @@ -73,8 +73,6 @@ vec3 scaleSoftClipFrag(vec3 l); void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten); vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten); -vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten); -vec3 fullbrightShinyAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten); vec4 getPositionWithDepth(vec2 pos_screen, float depth); vec4 getPosition(vec2 pos_screen); diff --git a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl index 868f5fe601..2e8946252b 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl @@ -43,25 +43,6 @@ vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten) return light; } -vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten) -{ - if (no_atmo == 1) - { - return light; - } - float brightness = dot(light.rgb, vec3(0.33333)); - return mix(atmosTransportFrag(light.rgb, additive, atten), light.rgb + additive.rgb, brightness * brightness * 0.1); -} - -vec3 fullbrightShinyAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten) { - if (no_atmo == 1) - { - return light; - } - float brightness = dot(light.rgb, vec3(0.33333)); - return mix(atmosTransportFrag(light.rgb, additive, atten), (light.rgb + additive.rgb) * (2.0 - brightness), brightness * brightness * 0.1); -} - vec3 atmosTransport(vec3 light) { return atmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation()); @@ -69,10 +50,10 @@ vec3 atmosTransport(vec3 light) vec3 fullbrightAtmosTransport(vec3 light) { - return fullbrightAtmosTransportFrag(light,getAdditiveColor(), getAtmosAttenuation()); + return atmosTransportFrag(light,getAdditiveColor(), getAtmosAttenuation()); } vec3 fullbrightShinyAtmosTransport(vec3 light) { - return fullbrightShinyAtmosTransportFrag(light,getAdditiveColor(), getAtmosAttenuation()); + return atmosTransportFrag(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 715d51f720..e7e56087ab 100644 --- a/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl +++ b/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl @@ -41,26 +41,6 @@ vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten) return (light + additive) * atten * 2.0; } -vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten) -{ - if (no_atmo == 1) - { - return light; - } - float brightness = dot(light.rgb, vec3(0.33333)); - return mix(atmosTransportFrag(light.rgb, additive,atten), light.rgb + additive.rgb, brightness * brightness); -} - -vec3 fullbrightShinyAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten) -{ - if (no_atmo == 1) - { - return light; - } - float brightness = dot(light.rgb, vec3(0.33333)); - return mix(atmosTransportFrag(light.rgb, additive, atten), (light.rgb + additive.rgb) * (2.0 - brightness), brightness * brightness); -} - vec3 atmosTransport(vec3 light) { return atmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation()); @@ -68,10 +48,10 @@ vec3 atmosTransport(vec3 light) vec3 fullbrightAtmosTransport(vec3 light) { - return fullbrightAtmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation()); + return atmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation()); } vec3 fullbrightShinyAtmosTransport(vec3 light) { - return fullbrightShinyAtmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation()); + return atmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation()); } -- cgit v1.2.3