summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-07-10 14:50:59 -0700
committerGraham Linden <graham@lindenlab.com>2019-07-10 14:50:59 -0700
commit664722168d7016d8bf80a65626bbff542913dc24 (patch)
tree688a2097614bb99d9e0c982a42db98ea6aed0560 /indra/newview/app_settings/shaders/class2
parentd23bf2c16e2d36b18c920bbd42f49c47f3c58bd9 (diff)
SL-1491
Make sun additive contribition depend on facing the sun (without breaking fog). Put back scaling factor keeping sun contrib from blowing out with new FS param range for glow.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl4
2 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index eeab6ed03d..0223cef531 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -59,7 +59,7 @@ uniform vec2 screen_res;
vec3 getNorm(vec2 pos_screen);
vec4 getPositionWithDepth(vec2 pos_screen, float depth);
-void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten, bool use_ao);
+void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten, bool use_ao);
float getAmbientClamp();
vec3 atmosFragLighting(vec3 l, vec3 additive, vec3 atten);
vec3 scaleSoftClipFrag(vec3 l);
@@ -109,7 +109,7 @@ void main()
vec3 additive;
vec3 atten;
- calcAtmosphericVars(pos.xyz, ambocc, sunlit, amblit, additive, atten, true);
+ calcAtmosphericVars(pos.xyz, light_dir, ambocc, sunlit, amblit, additive, atten, true);
float ambient = da;
ambient *= 0.5;
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
index baba79ca96..a4bd0d566b 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
@@ -32,7 +32,7 @@ void setPositionEye(vec3 v);
vec3 getAdditiveColor();
-void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten, bool use_ao);
+void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten, bool use_ao);
void calcAtmospherics(vec3 inPositionEye) {
@@ -42,7 +42,7 @@ void calcAtmospherics(vec3 inPositionEye) {
vec3 tmpamblit = vec3(1);
vec3 tmpaddlit = vec3(1);
vec3 tmpattenlit = vec3(1);
- calcAtmosphericVars(inPositionEye, 1, tmpsunlit, tmpamblit, tmpaddlit, tmpattenlit, false);
+ calcAtmosphericVars(inPositionEye, vec3(0), 1, tmpsunlit, tmpamblit, tmpaddlit, tmpattenlit, false);
setSunlitColor(tmpsunlit);
setAmblitColor(tmpamblit);
setAdditiveColor(tmpaddlit);