stk-code_catmod/data/shaders/glow.frag
2014-02-28 17:29:05 +01:00

25 lines
363 B
GLSL

uniform sampler2D tex;
#if __VERSION__ >= 130
in vec2 uv;
out vec4 FragColor;
#else
varying vec2 uv;
#define FragColor gl_FragColor
#endif
void main()
{
vec2 coords = uv;
vec4 col = texture(tex, coords);
float alpha = col.a;
if (alpha < 0.04 || length(col.xyz) < 0.2) discard;
col *= vec4(vec3(4.0), 1.5);
col.a *= 0.6;
FragColor = col;
}