summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-08-09 22:46:47 +0100
committerGraham Linden <graham@lindenlab.com>2018-08-09 22:46:47 +0100
commitfacc678391417c5fa8ca659adc1d449bba2fd349 (patch)
treed41c4613a8bcb23ad6a35cef4c300e13fa23e4d9 /indra/newview/app_settings/shaders/class1
parentfb13d9746d8aaf48e27f5eb80254abe17ce66019 (diff)
MAINT-8951
Remove moon_dir related shader code causing sunlight shadow artifacting.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl8
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/materialF.glsl9
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl9
3 files changed, 6 insertions, 20 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index 8dda96984e..7f2c5add16 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -43,7 +43,6 @@ uniform mat3 env_mat;
uniform mat3 ssao_effect_mat;
uniform vec3 sun_dir;
-uniform vec3 moon_dir;
#if HAS_SHADOW
uniform sampler2DShadow shadowMap0;
@@ -286,12 +285,9 @@ void main()
calcFragAtmospherics(pos.xyz, 1.0, sunlit, amblit, additive, atten);
vec2 abnormal = encode_normal(norm.xyz);
- norm.xyz = decode_normal(abnormal.xy);
+ norm.xyz = decode_normal(abnormal.xy);
- float da_sun = dot(norm.xyz, sun_dir.xyz);
- float da_moon = dot(norm.xyz, moon_dir.xyz);
-
- float da = max(da_sun, da_moon);
+ float da = dot(norm.xyz, sun_dir.xyz);
float final_da = da;
final_da = min(final_da, shadow);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
index 4dc15dbc89..6e06453a5b 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
@@ -98,7 +98,6 @@ uniform mat3 env_mat;
uniform mat3 ssao_effect_mat;
uniform vec3 sun_dir;
-uniform vec3 moon_dir;
VARYING vec2 vary_fragcoord;
VARYING vec3 vary_position;
@@ -389,9 +388,7 @@ void main()
vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
- float da_sun =dot(norm.xyz, sun_dir.xyz);
- float da_moon =dot(norm.xyz, moon_dir.xyz);
- float da = max(da_sun, da_moon);
+ float da =dot(norm.xyz, sun_dir.xyz);
float final_da = da;
final_da = min(final_da, shadow);
@@ -421,9 +418,7 @@ void main()
// the old infinite-sky shiny reflection
//
- float sa_sun = dot(refnormpersp, sun_dir.xyz);
- float sa_moon = dot(refnormpersp, moon_dir.xyz);
- float sa = max(sa_sun, sa_moon);
+ float sa = dot(refnormpersp, sun_dir.xyz);
vec3 dumbshiny = sunlit*shadow*(texture2D(lightFunc, vec2(sa, spec.a)).r);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index a4543c325e..ec3c0cb68d 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -56,7 +56,6 @@ uniform mat3 env_mat;
uniform mat3 ssao_effect_mat;
uniform vec3 sun_dir;
-uniform vec3 moon_dir;
VARYING vec2 vary_fragcoord;
uniform mat4 inv_proj;
@@ -107,9 +106,7 @@ void main()
float envIntensity = norm.z;
norm.xyz = decode_normal(norm.xy); // unpack norm
- float da_sun = dot(norm.xyz, sun_dir.xyz);
- float da_moon = dot(norm.xyz, moon_dir.xyz);
- float da = max(da_sun, da_moon);
+ float da = dot(norm.xyz, sun_dir.xyz);
float final_da = max(0.0,da);
final_da = min(final_da, 1.0f);
@@ -151,9 +148,7 @@ void main()
// the old infinite-sky shiny reflection
//
- float sa_sun = dot(refnormpersp, sun_dir.xyz);
- float sa_moon = dot(refnormpersp, moon_dir.xyz);
- float sa = max(sa_sun, sa_moon);
+ float sa = dot(refnormpersp, sun_dir.xyz);
vec3 dumbshiny = sunlit*(texture2D(lightFunc, vec2(sa, spec.a)).r);