diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2009-10-28 17:09:13 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2009-10-28 17:09:13 -0700 |
commit | 9426de7e10fa7cfe84048ae7dd58a793e981ee33 (patch) | |
tree | 3f08086776a8175741f23071333b593992269c45 /indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl | |
parent | a0e766da94d786d306a86667a27728524ca6eedb (diff) | |
parent | 74e70f2f23901d524350252519beaef8ed6d42e5 (diff) |
merging...
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl | 16 |
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; |