summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl18
1 files changed, 9 insertions, 9 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
index 8d48bb016b..d9c0e590c8 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
@@ -33,8 +33,8 @@ out vec4 frag_color;
#define frag_color gl_FragColor
#endif
-uniform sampler2DRect diffuseRect;
-uniform sampler2DRect lightMap;
+uniform sampler2D diffuseRect;
+uniform sampler2D lightMap;
uniform mat4 inv_proj;
uniform vec2 screen_res;
@@ -46,12 +46,12 @@ uniform float dof_height;
VARYING vec2 vary_fragcoord;
-vec4 dofSample(sampler2DRect tex, vec2 tc)
+vec4 dofSample(sampler2D tex, vec2 tc)
{
tc.x = min(tc.x, dof_width);
tc.y = min(tc.y, dof_height);
- return texture2DRect(tex, tc);
+ return texture2D(tex, tc);
}
void main()
@@ -60,7 +60,7 @@ void main()
vec4 dof = dofSample(diffuseRect, vary_fragcoord.xy*res_scale);
- vec4 diff = texture2DRect(lightMap, vary_fragcoord.xy);
+ vec4 diff = texture2D(lightMap, vary_fragcoord.xy);
float a = min(abs(diff.a*2.0-1.0) * max_cof*res_scale*res_scale, 1.0);
@@ -69,10 +69,10 @@ void main()
float sc = a/res_scale;
vec4 col;
- col = texture2DRect(lightMap, vary_fragcoord.xy+vec2(sc,sc));
- col += texture2DRect(lightMap, vary_fragcoord.xy+vec2(-sc,sc));
- col += texture2DRect(lightMap, vary_fragcoord.xy+vec2(sc,-sc));
- col += texture2DRect(lightMap, vary_fragcoord.xy+vec2(-sc,-sc));
+ col = texture2D(lightMap, vary_fragcoord.xy+vec2(sc,sc)/screen_res);
+ col += texture2D(lightMap, vary_fragcoord.xy+vec2(-sc,sc)/screen_res);
+ col += texture2D(lightMap, vary_fragcoord.xy+vec2(sc,-sc)/screen_res);
+ col += texture2D(lightMap, vary_fragcoord.xy+vec2(-sc,-sc)/screen_res);
diff = mix(diff, col*0.25, a);
}