How does one convert an image to grayscale in OpenGL?
문제
This might seem like a simple question but Id like to know the fastest technique for converting an RGBA image to a grayscale image in OpenGL WITHOUT using GLSL. I.e. How do I take an RGBA texture and convert it to a plain single channel texture using the following formula: output=0.3*RED + 0.59*GREEN + 0.11*Blue
해결책
You might be able to convince GL_DOT3_RGB
to do what you want.
다른 팁
Well I don't know about "fastest", but you should be able to do the opposite of this tutorial and get the greyscale image you're looking for. The techniques are the same just backwards.
제휴하지 않습니다 StackOverflow