Hi Jim,
.....................
// activate blending to be able to write to gl_FragColor.a
stateset->setMode(GL_BLEND, osg::StateAttribute::ON);
......................
No, this comment has a misunderstanding.
Writing to gl_FragColor.a in the fragment shader does work of course
but it isn't the final RGBA value as the pipeline has
a hardware stage AFTER the fragment shader.
I agree that whatever is put in gl_FragColor.a will not be the final
alpha value in the framebuffer, but at least if we put gl_FragColor.a =
0.0 then the current fragment shader's output color should be
transparent, and so anything behind should be completely visible, right?
We were working under that assumption. If not, then is there some other
way to "kill" a fragment we don't want to show up once we're at the
fragment shader stage? (I seem to recall there was a way, but I can't
remember the specifics).
Thanks,
J-S
--
______________________________________________________
Jean-Sebastien Guay [email protected]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org