stk-code_catmod/data/shaders/bloom.frag
vincentlj fa068d7810 OGL32CTX: Ask #version 130 for all our shaders
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14919 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2014-01-05 00:08:00 +00:00

15 lines
289 B
GLSL

#version 130
uniform sampler2D tex;
uniform float low;
void main()
{
vec3 weights = vec3(0.2126, 0.7152, 0.0722); // ITU-R BT. 709
vec3 col = texture2D(tex, gl_TexCoord[0].xy).xyz;
float luma = dot(weights, col);
col *= smoothstep(low, 0.9, luma);
gl_FragColor = vec4(col, 1.0);
}