summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders
diff options
context:
space:
mode:
authorAdam Moss <moss@lindenlab.com>2009-10-24 14:19:29 +0000
committerAdam Moss <moss@lindenlab.com>2009-10-24 14:19:29 +0000
commitadd9298c1e4d74bdb5503722a6c795ea6f30fa11 (patch)
tree1d32326be5e5498f8742e445d615548867a1cde0 /indra/newview/app_settings/shaders
parent576b8fe6ec9aa4ad712de757341862c89ff7df36 (diff)
DEV-41803 class2 deferred light smoothing wrong in creases
to be reviewed by davep
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl16
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl
index 8bd702a8da..28908a311d 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl
@@ -46,11 +46,15 @@ void main()
dlt /= max(-pos.z*dist_factor, 1.0);
- vec2 defined_weight = kern[0].xy; // special case the first (centre) sample's weight in the blur; we have to sample it anyway so we get it for 'free'
+ vec2 defined_weight = kern[0].xy; // special case the kern[0] (centre) sample's weight in the blur; we have to sample it anyway so we get it for 'free'
vec4 col = defined_weight.xyxx * ccol;
+
+ float center_e = 1.0 - (texture2DRect(edgeMap, vary_fragcoord.xy).a+
+ texture2DRect(edgeMap, vary_fragcoord.xy+dlt*0.333).a+
+ texture2DRect(edgeMap, vary_fragcoord.xy-dlt*0.333).a);
- float e = 1.0;
- for (int i = 0; i < 4; i++)
+ float e = center_e;
+ for (int i = 1; i < 4; i++)
{
vec2 tc = vary_fragcoord.xy + kern[i].z*dlt;
@@ -67,10 +71,8 @@ void main()
texture2DRect(edgeMap, tc.xy-dlt*0.333).a;
}
-
- e = 1.0;
-
- for (int i = 0; i < 4; i++)
+ e = center_e;
+ for (int i = 1; i < 4; i++)
{
vec2 tc = vary_fragcoord.xy - kern[i].z*dlt;