Hello,
I try to write information of other things rather than that of color
into gl_FragColor through programmable fragment shader.
e.g. gl_FragColor = vec4(0.1,0.2,0.3,0.2);
However, whatever value I set gl_color.a(the fourth element above)
through fragment shader, I get the value of 1 when access the frame
buffer.
I tried to work out this problem by adding following code :
osg::ColorMask* cm = new osg::ColorMask(true,true,true,true);
NodeOfRenderingObject->getOrCreateStateSet()->setAttributeAndModes(cm,osg::StateAttribute::ON);
NodeOfRenderingCamera->getOrCreateStateSet()->setAttributeAndModes(cm,osg::StateAttribute::ON);
But the corresponding value of gl_color.a in frame buffer remains to be 1.
Could anybody give any advice?
Thank you very much in advance!
Best regards
Shuiying
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org