If you are trying to read the alpha value from a framebuffer that has only RGB,
then you will always read 1.0 for alpha, per OpenGL spec.
-Paul
On 1/3/2012 6:55 AM, wang shuiying wrote:
Hello,
In my programme, the fourth element of gl_FragColor is changed by fragment
shader to be a random number between 0 and 1. But when I access this element
by the corresponding image, the element is always 1. I got to know that in
the rendering pipeline after fragment operation, there should be alpha test
and blend and so on. When I turn off all those functions, the fourth element
of gl_FragColor, which corresponds to the value of alpha, should not be
affected by those tests, right? But it remains to be 1. Is there anybody who
can give me some advice on that? I want to make use of the fourth element to
record the material index of the objects attached to the camera in question.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org