summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/effects/glowF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/effects/glowF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowF.glsl30
1 files changed, 13 insertions, 17 deletions
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowF.glsl
index c1f6af9f57..8718dd8b52 100644
--- a/indra/newview/app_settings/shaders/class1/effects/glowF.glsl
+++ b/indra/newview/app_settings/shaders/class1/effects/glowF.glsl
@@ -23,19 +23,15 @@
* $/LicenseInfo$
*/
-#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
-#else
-#define frag_color gl_FragColor
-#endif
uniform sampler2D diffuseMap;
uniform float glowStrength;
-VARYING vec4 vary_texcoord0;
-VARYING vec4 vary_texcoord1;
-VARYING vec4 vary_texcoord2;
-VARYING vec4 vary_texcoord3;
+in vec4 vary_texcoord0;
+in vec4 vary_texcoord1;
+in vec4 vary_texcoord2;
+in vec4 vary_texcoord3;
void main()
{
@@ -47,14 +43,14 @@ void main()
kern[0] = 0.25; kern[1] = 0.5; kern[2] = 0.8; kern[3] = 1.0;
kern[4] = 1.0; kern[5] = 0.8; kern[6] = 0.5; kern[7] = 0.25;
- col += kern[0] * texture2D(diffuseMap, vary_texcoord0.xy);
- col += kern[1] * texture2D(diffuseMap, vary_texcoord1.xy);
- col += kern[2] * texture2D(diffuseMap, vary_texcoord2.xy);
- col += kern[3] * texture2D(diffuseMap, vary_texcoord3.xy);
- col += kern[4] * texture2D(diffuseMap, vary_texcoord0.zw);
- col += kern[5] * texture2D(diffuseMap, vary_texcoord1.zw);
- col += kern[6] * texture2D(diffuseMap, vary_texcoord2.zw);
- col += kern[7] * texture2D(diffuseMap, vary_texcoord3.zw);
+ col += kern[0] * texture(diffuseMap, vary_texcoord0.xy);
+ col += kern[1] * texture(diffuseMap, vary_texcoord1.xy);
+ col += kern[2] * texture(diffuseMap, vary_texcoord2.xy);
+ col += kern[3] * texture(diffuseMap, vary_texcoord3.xy);
+ col += kern[4] * texture(diffuseMap, vary_texcoord0.zw);
+ col += kern[5] * texture(diffuseMap, vary_texcoord1.zw);
+ col += kern[6] * texture(diffuseMap, vary_texcoord2.zw);
+ col += kern[7] * texture(diffuseMap, vary_texcoord3.zw);
- frag_color = vec4(col.rgb * glowStrength, col.a);
+ frag_color = max(vec4(col.rgb * glowStrength, col.a), vec4(0));
}