summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-11-30 04:26:44 -0600
committerDave Parks <davep@lindenlab.com>2010-11-30 04:26:44 -0600
commit7166b4009f738281cfacbb9b5810dfba360ec2fd (patch)
treed20db5949997c5a8b0c15e625905387b117abb00 /indra/newview/app_settings
parentd5227c6dd155081acb5c3ed0d333f0918ba886ca (diff)
Ditch fake anti-aliasing for deferred rendering.
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl51
1 files changed, 1 insertions, 50 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
index a379910101..77e3e41ea4 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
@@ -68,7 +68,6 @@ void main()
depth[0] = getDepth(tc);
vec4 diff = texture2DRect(diffuseRect, vary_fragcoord.xy);
- bool do_aa = true;
if (depth[0] < far_focal_distance)
{ //pixel is behind far focal plane
@@ -82,7 +81,6 @@ void main()
while (sc > 1.0)
{
- do_aa = false;
dofSample(diff,w, fd, sc,sc);
dofSample(diff,w, fd, -sc,sc);
dofSample(diff,w, fd, sc,-sc);
@@ -112,7 +110,6 @@ void main()
fd = depth[0];
while (sc > 1.0)
{
- do_aa = false;
dofSampleNear(diff,w, sc,sc);
dofSampleNear(diff,w, -sc,sc);
dofSampleNear(diff,w, sc,-sc);
@@ -128,54 +125,8 @@ void main()
}
diff /= w;
}
-
- if (do_aa)
- {
- depth[1] = getDepth(tc+vec2(sc,sc));
- depth[2] = getDepth(tc+vec2(-sc,-sc));
- depth[3] = getDepth(tc+vec2(-sc,sc));
- depth[4] = getDepth(tc+vec2(sc, -sc));
-
-
- vec2 de;
- de.x = (depth[0]-depth[1]) + (depth[0]-depth[2]);
- de.y = (depth[0]-depth[3]) + (depth[0]-depth[4]);
- de /= depth[0];
- de *= de;
- de = step(depth_cutoff, de);
-
- vec2 ne;
- vec3 nexnorm = texture2DRect(normalMap, tc+vec2(-sc,-sc)).rgb;
- nexnorm = vec3((nexnorm.xy-0.5)*2.0,nexnorm.z); // unpack norm
- ne.x = dot(nexnorm, norm);
- vec3 neynorm = texture2DRect(normalMap, tc+vec2(sc,sc)).rgb;
- neynorm = vec3((neynorm.xy-0.5)*2.0,neynorm.z); // unpack norm
- ne.y = dot(neynorm, norm);
-
- ne = 1.0-ne;
-
- ne = step(norm_cutoff, ne);
-
- float edge_weight = clamp(dot(de,de)+dot(ne,ne), 0.0, 1.0);
- //edge_weight *= 0.0;
-
- //diff.r = edge_weight;
-
- if (edge_weight > 0.0)
- {
- diff += texture2DRect(diffuseRect, vary_fragcoord.xy+vec2(1,1))*edge_weight;
- diff += texture2DRect(diffuseRect, vary_fragcoord.xy+vec2(-1,-1))*edge_weight;
- diff += texture2DRect(diffuseRect, vary_fragcoord.xy+vec2(-1,1))*edge_weight;
- diff += texture2DRect(diffuseRect, vary_fragcoord.xy+vec2(1,-1))*edge_weight;
- diff += texture2DRect(diffuseRect, vary_fragcoord.xy+vec2(-1,0))*edge_weight;
- diff += texture2DRect(diffuseRect, vary_fragcoord.xy+vec2(1,0))*edge_weight;
- diff += texture2DRect(diffuseRect, vary_fragcoord.xy+vec2(0,1))*edge_weight;
- diff += texture2DRect(diffuseRect, vary_fragcoord.xy+vec2(0,-1))*edge_weight;
- diff /= 1.0+edge_weight*8.0;
- }
- }
}
-
+
vec4 bloom = texture2D(bloomMap, vary_fragcoord.xy/screen_res);
gl_FragColor = diff + bloom;