stk-code_catmod/data/shaders/bloom.frag

23 lines
341 B
GLSL
Raw Normal View History

uniform sampler2D tex;
uniform float low;
#if __VERSION__ >= 130
in vec2 uv;
out vec4 FragColor;
#else
varying vec2 uv;
#define FragColor gl_FragColor
#endif
2014-03-28 18:30:26 -04:00
vec3 getCIEYxy(vec3 rgbColor);
void main()
{
vec3 col = texture(tex, uv).xyz;
2014-03-28 18:30:26 -04:00
float luma = getCIEYxy(col).x;
2014-04-13 20:15:28 -04:00
col *= smoothstep(1., 100., luma);
FragColor = vec4(col, 1.0);
}