Hi,

I have many osgText::text objects flying around a 3D scene (ie, not in a HUD) 
and transparency is not working correctly. The quads of the text in front 
entirely occlude the text behind, even though transparency is enabled.

Other geometry shows up fine. See the attached image. The white text behind is 
occluded but the lines of my grid are properly drawn through the transparent 
regions of the letters.

[Image: http://forum.openscenegraph.org/files/spinviewerscreensnapz003_175.png ]

If I move the white text in front, both are drawn perfectly. ie, it seems to 
have something to do with their order of creation (or traversal).

For both, I enable blending, depth test, and provide the TRANSPARENT_BIN 
rendering hint:

Code:

labelStateSet->setMode( GL_BLEND, osg::StateAttribute::ON );
labelStateSet->setMode( GL_DEPTH_TEST, osg::StateAttribute::ON );
labelStateSet->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);



I have played with manually setting rendering bins, which can force a 
particular text to draw in front of another, but I want all these pieces of 
text to automatically sort and render correctly without manual input.

Any hints?

Thanks,
Mike[/img]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=47946#47946




Attachments: 
http://forum.openscenegraph.org//files/spinviewerscreensnapz003_175.png


_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to