but I was making a quick black and white filter and it came to me that the average method that most people would use (R+G+B)/3 is a bit too dark. So I came up with this;
fragment shader
Code: Select all
uniform sampler2D tex;
void main() {
vec4 FragColor = texture2D(tex, gl_TexCoord);
gl_FragColor = max(FragColor.r,max(FragColor.g,FragColor.b));
}