stk-code_catmod/data/shaders/bloom.frag
vincentlj 9968ff1ccf Use custom opengl call for bloom fullscreen shader.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@15022 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2014-01-12 21:07:14 +00:00

17 lines
287 B
GLSL

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