1
uniform sampler2D sampler;
3
uniform float brightness;
4
uniform float saturation;
6
varying vec2 varyingTexCoords;
10
vec4 tex = texture2D(sampler, varyingTexCoords);
11
if( saturation != 1.0 )
13
vec3 desaturated = tex.rgb * vec3( 0.30, 0.59, 0.11 );
14
desaturated = vec3( dot( desaturated, tex.rgb ));
15
tex.rgb = tex.rgb * vec3( saturation ) + desaturated * vec3( 1.0 - saturation );
17
// tex.rgb = tex.rgb * opacity * brightness;
18
// tex.a = tex.a * opacity;