diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/windlight/transportF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/windlight/transportF.glsl | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl index bf64605014..75d1bb0cd5 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl @@ -32,7 +32,7 @@ vec3 getAtmosAttenuation(); uniform int no_atmo; -vec3 atmosFragTransport(vec3 light, vec3 atten, vec3 additive) +vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten) { if (no_atmo == 1) { @@ -41,32 +41,36 @@ vec3 atmosFragTransport(vec3 light, vec3 atten, vec3 additive) return (light + additive) * atten * 2.0; } -vec3 fullbrightFragAtmosTransport(vec3 light, vec3 atten, vec3 additive) { +vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten) +{ if (no_atmo == 1) { return light; } float brightness = dot(light.rgb, vec3(0.33333)); - return mix(atmosFragTransport(light.rgb, atten, additive), light.rgb + additive.rgb, brightness * brightness); + return mix(atmosTransportFrag(light.rgb, additive, atten), light.rgb + additive.rgb, brightness * brightness); } -vec3 fullbrightFragShinyAtmosTransport(vec3 light, vec3 atten, vec3 additive) { +vec3 fullbrightShinyAtmosTransportFrag(vec3 light, vec3 atten, vec3 additive) { if (no_atmo == 1) { return light; } float brightness = dot(light.rgb, vec3(0.33333)); - return mix(atmosFragTransport(light.rgb, atten, additive), (light.rgb + additive.rgb) * (2.0 - brightness), brightness * brightness); + return mix(atmosTransportFrag(light.rgb, additive, atten), (light.rgb + additive.rgb) * (2.0 - brightness), brightness * brightness); } -vec3 atmosTransport(vec3 light) { - return (no_atmo == 1) ? light : atmosFragTransport(light, getAtmosAttenuation(), getAdditiveColor()); +vec3 atmosTransport(vec3 light) +{ + return atmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation()); } -vec3 fullbrightAtmosTransport(vec3 light) { - return (no_atmo == 1) ? light : fullbrightFragAtmosTransport(light, getAtmosAttenuation(), getAdditiveColor()); +vec3 fullbrightAtmosTransport(vec3 light) +{ + return fullbrightAtmosTransportFrag(light,getAdditiveColor(), getAtmosAttenuation()); } -vec3 fullbrightShinyAtmosTransport(vec3 light) { - return (no_atmo == 1) ? light : fullbrightFragShinyAtmosTransport(light, getAtmosAttenuation(), getAdditiveColor()); +vec3 fullbrightShinyAtmosTransport(vec3 light) +{ + return fullbrightShinyAtmosTransportFrag(light,getAdditiveColor(), getAtmosAttenuation()); } |