2013-11-30 16:33:06 -05:00
|
|
|
uniform sampler2D tex;
|
|
|
|
uniform float low;
|
|
|
|
|
2014-02-28 11:29:05 -05:00
|
|
|
#if __VERSION__ >= 130
|
2014-01-12 16:07:14 -05:00
|
|
|
in vec2 uv;
|
2014-01-19 13:31:00 -05:00
|
|
|
out vec4 FragColor;
|
2014-02-28 11:29:05 -05:00
|
|
|
#else
|
|
|
|
varying vec2 uv;
|
|
|
|
#define FragColor gl_FragColor
|
|
|
|
#endif
|
|
|
|
|
2014-03-28 18:30:26 -04:00
|
|
|
vec3 getCIEYxy(vec3 rgbColor);
|
2014-01-12 16:07:14 -05:00
|
|
|
|
2013-11-30 16:33:06 -05:00
|
|
|
void main()
|
|
|
|
{
|
2014-01-19 12:53:35 -05:00
|
|
|
vec3 col = texture(tex, uv).xyz;
|
2014-03-28 18:30:26 -04:00
|
|
|
float luma = getCIEYxy(col).x;
|
2013-11-30 16:33:06 -05:00
|
|
|
|
2014-04-13 20:45:15 -04:00
|
|
|
col *= smoothstep(1., 10., luma);
|
2013-11-30 16:33:06 -05:00
|
|
|
|
2014-01-19 13:31:00 -05:00
|
|
|
FragColor = vec4(col, 1.0);
|
2013-11-30 16:33:06 -05:00
|
|
|
}
|