diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/windlight')
5 files changed, 27 insertions, 11 deletions
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl index 229f8073b0..9653e0809e 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl @@ -52,13 +52,13 @@ vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten) return light; } light *= atten.r; - light += additive; + light += additive * 2.0; return light; } vec3 atmosLighting(vec3 light) { - return (no_atmo == 1) ? light : atmosFragLighting(light, getAdditiveColor(), getAtmosAttenuation()); + return atmosFragLighting(light, getAdditiveColor(), getAtmosAttenuation()); } void calcFragAtmospherics(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten) { diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersF.glsl index 8648c38501..63c683c99e 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersF.glsl @@ -37,3 +37,8 @@ vec3 atmosFragAffectDirectionalLight(float lightIntensity, vec3 sunlit) return sunlit * lightIntensity; } +vec3 scaleDownLightFrag(vec3 light) +{ + return (light / scene_light_strength ); +} + diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl index a83aa95f95..62a034ce05 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl @@ -49,3 +49,13 @@ vec3 atmosGetDiffuseSunlightColor() return getSunlitColor(); } +vec3 scaleDownLight(vec3 light) +{ + return (light / scene_light_strength ); +} + +vec3 scaleUpLight(vec3 light) +{ + return (light * scene_light_strength); +} + diff --git a/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl b/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl index 187876acf7..6401845af2 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl @@ -36,10 +36,10 @@ vec3 scaleSoftClipFrag(vec3 light) { return light; } - //soft clip effect: - light = 1. - clamp(light, vec3(0.), vec3(1.)); - light = 1. - pow(light, gamma.xxx); - return light; + //soft clip effect: + light = 1. - clamp(light, vec3(0.), vec3(1.)); + light = 1. - pow(light, gamma.xxx); + return light; } vec3 scaleSoftClip(vec3 light) @@ -47,13 +47,12 @@ vec3 scaleSoftClip(vec3 light) return scaleSoftClipFrag(light); } -vec3 fullbrightScaleSoftClipFrag(vec3 light) -{ - return scaleSoftClipFrag(light.rgb); +vec3 fullbrightScaleSoftClipFrag(vec3 light) { + return mix(scaleSoftClip(light.rgb), light.rgb, getAtmosAttenuation()); } vec3 fullbrightScaleSoftClip(vec3 light) { - return fullbrightScaleSoftClipFrag(light.rgb); + return fullbrightScaleSoftClipFrag(light); } diff --git a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl index 75d1bb0cd5..359fea3073 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl @@ -38,7 +38,9 @@ vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten) { return light; } - return (light + additive) * atten * 2.0; + light *= atten.r; + light += additive * 2.0; + return light; } vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten) |