summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class2')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl10
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl9
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersF.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/transportF.glsl10
7 files changed, 15 insertions, 29 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index fa81317f3f..c92dbda185 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -83,13 +83,13 @@ vec3 atmosFragLighting(vec3 l, vec3 additive, vec3 atten);
vec3 fullbrightScaleSoftClipFrag(vec3 l);
vec3 scaleSoftClipFrag(vec3 l);
-vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten) {
- if (no_atmo == 0)
+vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten)
+{
+ if (no_atmo == 1)
{
- light *= atten.r;
- light += additive * 2.0;
+ return light;
}
- return light;
+ return (light + additive) * atten.r * 2.0;
}
vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten) {
diff --git a/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl b/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
index 3acf9fe883..eef259349f 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
@@ -31,7 +31,6 @@ vec3 calcPointLightSpecular(inout vec4 specular, vec3 view, vec3 v, vec3 n, vec3
vec3 atmosAmbient(vec3 light);
vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 atmosGetDiffuseSunlightColor();
-vec3 scaleDownLight(vec3 light);
uniform vec4 light_position[8];
uniform vec3 light_attenuation[8];
@@ -50,7 +49,6 @@ vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor
col.rgb += light_diffuse[1].rgb * calcDirectionalLightSpecular(specularColor, view, norm, light_position[1].xyz,light_diffuse[1].rgb, 1.0);
col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, light_position[2].xyz, light_attenuation[2].x, light_attenuation[2].y, light_diffuse[2].rgb);
col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, light_position[3].xyz, light_attenuation[3].x, light_attenuation[3].y, light_diffuse[3].rgb);
- col.rgb = scaleDownLight(col.rgb);
// Add windlight lights
col.rgb += atmosAmbient(baseCol.rgb);
diff --git a/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl b/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
index c9987ef3b9..b42506dd40 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
@@ -28,7 +28,6 @@ float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, floa
vec3 atmosAmbient(vec3 light);
vec3 atmosAffectDirectionalLight(float lightIntensity);
-vec3 scaleDownLight(vec3 light);
uniform vec4 light_position[8];
uniform vec3 light_direction[8];
@@ -45,8 +44,6 @@ vec4 sumLights(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)
col.rgb += light_diffuse[2].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].z);
col.rgb += light_diffuse[3].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].z);
- col.rgb = scaleDownLight(col.rgb);
-
// Add windlight lights
col.rgb += atmosAmbient(baseLight.rgb);
col.rgb += atmosAffectDirectionalLight(calcDirectionalLight(norm, light_position[0].xyz));
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
index 89bdbfc0e6..229f8073b0 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
@@ -47,12 +47,13 @@ vec3 scaleSoftClipFrag(vec3 light);
vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten)
{
- if (no_atmo == 0)
+ if (no_atmo == 1)
{
- light *= atten.r;
- light += additive;
+ return light;
}
- return (2.0 * light);
+ light *= atten.r;
+ light += additive;
+ return light;
}
vec3 atmosLighting(vec3 light)
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersF.glsl
index 63c683c99e..8648c38501 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersF.glsl
@@ -37,8 +37,3 @@ 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 617704ff67..a83aa95f95 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl
@@ -49,8 +49,3 @@ vec3 atmosGetDiffuseSunlightColor()
return getSunlitColor();
}
-vec3 scaleDownLight(vec3 light)
-{
- return (light / scene_light_strength );
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
index 976e5066dc..bf64605014 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
@@ -32,13 +32,13 @@ vec3 getAtmosAttenuation();
uniform int no_atmo;
-vec3 atmosFragTransport(vec3 light, vec3 atten, vec3 additive) {
- if (no_atmo == 0)
+vec3 atmosFragTransport(vec3 light, vec3 atten, vec3 additive)
+{
+ if (no_atmo == 1)
{
- light *= atten.r;
- light += additive * 2.0;
+ return light;
}
- return light;
+ return (light + additive) * atten * 2.0;
}
vec3 fullbrightFragAtmosTransport(vec3 light, vec3 atten, vec3 additive) {