summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/materialF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl8
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl2
-rw-r--r--indra/newview/pipeline.cpp3
6 files changed, 10 insertions, 9 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index b00e2290a9..c4d89f29f6 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -223,7 +223,7 @@ void main()
float ambient = da;
ambient *= 0.5;
ambient *= ambient;
- ambient = max(getAmbientClamp(), ambient); // keeps shadows dark
+ //ambient = max(getAmbientClamp(), ambient); // keeps shadows dark
ambient = 1.0 - ambient;
vec3 sun_contrib = min(final_da, shadow) * sunlit;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
index 541d6bd4fb..64cdacd4a2 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
@@ -319,7 +319,7 @@ void main()
float ambient = da;
ambient *= 0.5;
ambient *= ambient;
- ambient = max(getAmbientClamp(), ambient);
+ //ambient = max(getAmbientClamp(), ambient);
ambient = 1.0 - ambient;
vec3 sun_contrib = min(final_da, shadow) * sunlit;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl
index c2cb0eb8c3..14cd805d10 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl
@@ -50,7 +50,7 @@ float pcfShadow(sampler2DShadow shadowMap, vec3 norm, vec4 stc, float bias_mul,
{
float offset = shadow_bias * bias_mul;
stc.xyz /= stc.w;
- stc.z += offset * 4.0;
+ stc.z += offset * 2.0;
stc.x = floor(stc.x*shadow_res.x + fract(stc.y*shadow_res.y))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
float cs = shadow2D(shadowMap, stc.xyz).x;
float shadow = cs * 4.0;
@@ -124,7 +124,7 @@ float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen)
float w = 1.0;
w -= max(spos.z-far_split.y, 0.0)/transition_domain.y;
w -= max(near_split.z-spos.z, 0.0)/transition_domain.z;
- w = clamp(w, 0.25, 1.0);
+ w = clamp(w, 0.0, 1.0);
shadow += pcfShadow(shadowMap2, norm, lpos, 1.0, pos_screen, light_dir)*w;
weight += w;
}
@@ -136,7 +136,7 @@ float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen)
float w = 1.0;
w -= max(spos.z-far_split.x, 0.0)/transition_domain.x;
w -= max(near_split.y-spos.z, 0.0)/transition_domain.y;
- w = clamp(w, 0.5, 1.0);
+ w = clamp(w, 0.0, 1.0);
shadow += pcfShadow(shadowMap1, norm, lpos, 1.0, pos_screen, light_dir)*w;
weight += w;
}
@@ -147,7 +147,7 @@ float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen)
float w = 1.0;
w -= max(near_split.x-spos.z, 0.0)/transition_domain.x;
- w = clamp(w, 0.75, 1.0);
+ w = clamp(w, 0.0, 1.0);
shadow += pcfShadow(shadowMap0, norm, lpos, 1.0, pos_screen, light_dir)*w;
weight += w;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 9d6958381b..981a50769a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -106,7 +106,7 @@ void main()
float ambient = da;
ambient *= 0.5;
ambient *= ambient;
- ambient = max(getAmbientClamp(), ambient);
+ //ambient = max(getAmbientClamp(), ambient);
ambient = 1.0 - ambient;
vec3 sun_contrib = final_da * sunlit;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 430b85eee1..f6f8f56103 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -113,7 +113,7 @@ void main()
float ambient = da;
ambient *= 0.5;
ambient *= ambient;
- ambient = max(getAmbientClamp(), ambient);
+ //ambient = max(getAmbientClamp(), ambient);
ambient = 1.0 - ambient;
vec3 sun_contrib = min(scol, final_da) * sunlit;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index f1a75f1277..9d8f5721d2 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -10181,7 +10181,8 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
//LLVector3 n = RenderShadowNearDist;
//F32 nearDist[] = { n.mV[0], n.mV[1], n.mV[2], n.mV[2] };
- LLVector3 caster_dir(environment.getIsSunUp() ? mSunDir : mMoonDir);
+ LLVector3 caster_dir(environment.getIsSunUp() ? LLVector3(environment.getClampedSunNorm()) :
+ environment.getIsMoonUp() ? LLVector3(environment.getClampedMoonNorm()) : LLVector3(0,0,1));
//put together a universal "near clip" plane for shadow frusta
LLPlane shadow_near_clip;