summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/cofF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/cofF.glsl12
1 files changed, 3 insertions, 9 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl
index 929b4e17b1..d95a33a6be 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/cofF.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 depthMap;
@@ -47,7 +41,7 @@ uniform float max_cof;
uniform mat4 inv_proj;
uniform vec2 screen_res;
-VARYING vec2 vary_fragcoord;
+in vec2 vary_fragcoord;
float calc_cof(float depth)
{
@@ -68,13 +62,13 @@ void main()
{
vec2 tc = vary_fragcoord.xy;
- float z = texture2D(depthMap, tc).r;
+ float z = texture(depthMap, tc).r;
z = z*2.0-1.0;
vec4 ndc = vec4(0.0, 0.0, z, 1.0);
vec4 p = inv_proj*ndc;
float depth = p.z/p.w;
- vec4 diff = texture2D(diffuseRect, vary_fragcoord.xy);
+ vec4 diff = texture(diffuseRect, vary_fragcoord.xy);
float sc = calc_cof(depth);
sc = min(sc, max_cof);