Warning, /plasma/kwin/src/opengl/saturation.glsl is written in an unsupported language. File is not indexed.
0001 uniform float saturation;
0002 uniform vec3 primaryBrightness;
0003
0004 vec4 adjustSaturation(vec4 color) {
0005 // this calculates the Y component of the XYZ color representation for the color,
0006 // which roughly corresponds to the brightness of the RGB tuple
0007 float Y = dot(color.rgb, primaryBrightness);
0008 return vec4(mix(vec3(Y), color.rgb, saturation), color.a);
0009 }