문제

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.

http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=37

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top