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.glsl20
1 files changed, 7 insertions, 13 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
index d9c0e590c8..3b9b8ae696 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
@@ -23,15 +23,9 @@
* $/LicenseInfo$
*/
-#extension GL_ARB_texture_rectangle : enable
-
/*[EXTRA_CODE_HERE]*/
-#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
-#else
-#define frag_color gl_FragColor
-#endif
uniform sampler2D diffuseRect;
uniform sampler2D lightMap;
@@ -44,14 +38,14 @@ uniform float res_scale;
uniform float dof_width;
uniform float dof_height;
-VARYING vec2 vary_fragcoord;
+in vec2 vary_fragcoord;
vec4 dofSample(sampler2D tex, vec2 tc)
{
tc.x = min(tc.x, dof_width);
tc.y = min(tc.y, dof_height);
- return texture2D(tex, tc);
+ return texture(tex, tc);
}
void main()
@@ -60,7 +54,7 @@ void main()
vec4 dof = dofSample(diffuseRect, vary_fragcoord.xy*res_scale);
- vec4 diff = texture2D(lightMap, vary_fragcoord.xy);
+ vec4 diff = texture(lightMap, vary_fragcoord.xy);
float a = min(abs(diff.a*2.0-1.0) * max_cof*res_scale*res_scale, 1.0);
@@ -69,10 +63,10 @@ void main()
float sc = a/res_scale;
vec4 col;
- 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);
+ col = texture(lightMap, vary_fragcoord.xy+vec2(sc,sc)/screen_res);
+ col += texture(lightMap, vary_fragcoord.xy+vec2(-sc,sc)/screen_res);
+ col += texture(lightMap, vary_fragcoord.xy+vec2(sc,-sc)/screen_res);
+ col += texture(lightMap, vary_fragcoord.xy+vec2(-sc,-sc)/screen_res);
diff = mix(diff, col*0.25, a);
}