summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/lighting
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-04-26 16:02:21 -0700
committerGraham Linden <graham@lindenlab.com>2019-04-26 16:02:21 -0700
commitf133be068a4aa23c02c47348f5c7d4a28e1d5c37 (patch)
tree948e7fc0ed5fc01acb466f137e088a0d87ca6b64 /indra/newview/app_settings/shaders/class2/lighting
parent9d314074c9e3c898436321bdb90d3bf0d10c0079 (diff)
Lighting WIP
Consistency across class2/3/ALM lighting.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/lighting')
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl8
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl6
2 files changed, 5 insertions, 9 deletions
diff --git a/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl b/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
index 6fcc41cd6d..89d9d1bde3 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
@@ -28,7 +28,7 @@
float calcDirectionalLightSpecular(inout vec4 specular, vec3 view, vec3 n, vec3 l, vec3 lightCol, float da);
vec3 calcPointLightSpecular(inout vec4 specular, vec3 view, vec3 v, vec3 n, vec3 l, float r, float pw, vec3 lightCol);
-vec3 atmosAmbient(vec3 light);
+vec3 atmosAmbient();
vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 atmosGetDiffuseSunlightColor();
vec3 scaleDownLight(vec3 light);
@@ -37,7 +37,7 @@ uniform vec4 light_position[8];
uniform vec4 light_attenuation[8];
uniform vec3 light_diffuse[8];
-vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol)
+vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor)
{
vec4 col = vec4(0.0, 0.0, 0.0, color.a);
@@ -53,8 +53,8 @@ vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor
col.rgb = scaleDownLight(col.rgb);
// Add windlight lights
- col.rgb += atmosAmbient(baseCol.rgb);
- col.rgb += atmosAffectDirectionalLight(calcDirectionalLightSpecular(specularSum, view, norm, light_position[0].xyz,atmosGetDiffuseSunlightColor()*baseCol.a, 1.0));
+ col.rgb += atmosAmbient();
+ col.rgb += atmosAffectDirectionalLight(calcDirectionalLightSpecular(specularSum, view, norm, light_position[0].xyz, atmosGetDiffuseSunlightColor(), 1.0));
col.rgb = min(col.rgb*color.rgb, 1.0);
specularColor.rgb = min(specularColor.rgb*specularSum.rgb, 1.0);
diff --git a/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl b/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
index b4f4850646..57f93a8b36 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
@@ -26,7 +26,6 @@
float calcDirectionalLight(vec3 n, vec3 l);
float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float is_pointlight);
-vec3 atmosAmbient(vec3 light);
vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
@@ -35,7 +34,7 @@ uniform vec3 light_direction[8];
uniform vec3 light_attenuation[8];
uniform vec3 light_diffuse[8];
-vec4 sumLights(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)
+vec4 sumLights(vec3 pos, vec3 norm, vec4 color)
{
vec4 col = vec4(0.0, 0.0, 0.0, color.a);
@@ -46,11 +45,8 @@ vec4 sumLights(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)
col.rgb = scaleDownLight(col.rgb);
// Add windlight lights
- col.rgb += atmosAmbient(baseLight.rgb);
col.rgb += atmosAffectDirectionalLight(calcDirectionalLight(norm, light_position[0].xyz));
-
col.rgb = min(col.rgb*color.rgb, 1.0);
-
return col;
}