2014-03-30 16:56:50 -04:00
|
|
|
uniform sampler2D tex;
|
|
|
|
|
|
|
|
in vec2 uv;
|
|
|
|
out vec4 FragColor;
|
|
|
|
|
2014-04-21 13:39:39 -04:00
|
|
|
float delta = .0001;
|
2014-03-30 16:56:50 -04:00
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
vec3 weight = vec3(0.2125f, 0.7154f, 0.0721f);
|
|
|
|
vec3 col = texture(tex, uv).xyz;
|
2014-04-22 12:18:18 -04:00
|
|
|
float luma = dot(col, weight);
|
2014-03-30 16:56:50 -04:00
|
|
|
FragColor = vec4(log(luma + delta));
|
|
|
|
}
|