Not sure if shaders will bypass this (most likely not):
http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/colormask.html
Since you cant manually touch the color buffer, you need a copy of it:
1.)Draw your scene into a texture (FBO, PBO, etc).
or
2.)Use glCopyTexImage2D() and copy the color buffer to a texture. Then just draw a fullscreen quad with a shader:
gl_FragColor = pixel.rbga;
or
float average = (pixel.r + pixel.g + pixel.b)/3;
gl_FragColor = average; //grayscale
Popular Topics
Advertisement