[osg-users] Transparent texture turns opaque on screen edges

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Wed May 13 07:20:42 PDT 2020


I'm struggling around with some glitches. For the most situations my scene looks fine, but in some cases I got some side effects.

1.       It looks, that the transparent texture is always rendered on top. But from the used coordinates it is the last object behind all others.

2.       When I move close to the screen edge the transparency turns off, and the textured object turns black on top of all other objects.

Maybe a short description about the current scene.

I try to show some different overlapping objects: e.g. a colorized point cloud, some transparent and colorized shapes like triangles, and in the background (or better) near the ground plane a transparent texture. The transparent texture is moved into the opaque_bin...

    osg::StateSet* stateSet = geo->getOrCreateStateSet();
    stateSet->setMode( GL_BLEND, osg::StateAttribute::ON );
    stateSet->setTextureAttributeAndModes( 0, m_texture, osg::StateAttribute::ON );
    stateSet->setRenderingHint( osg::StateSet::OPAQUE_BIN );
    stateSet->setMode( GL_DEPTH_TEST, osg::StateAttribute::OFF );
        stateSet->setMode( GL_LIGHTING, osg::StateAttribute::OFF );

... when I try to put it to transparent_bin I got some smearing effects, but the described effect is still there.

Currently I'm not sure if I do not run into some other issues as well like clipping or something like that. Or maybe a shadow.

Maybe you have an hint or some further information, anything would be more than welcome ;)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200513/24181153/attachment.html>

More information about the osg-users mailing list