I managed to create a fragmented shader to convert a color image to shades of gray using:
float luminance = pixelColor.r * 0.299 + pixelColor.g * 0.587 + pixelColor.b * 0.114;
gl_FragColor = vec4(luminance, luminance, luminance, 1.0);
Now I would like to imitate the effect of the mixer of the Photoshop channel:

How to convert percentage values %(-70%, + 200%, -30%) to r g bfloating point numbers (e.g. 0.299, 0.587, 0.114)?
source
share