[osg-users] osgCal and osg::Fog
Laurent Di Cesare
laurent.dicesare at masagroup.net
Wed Oct 17 08:38:51 PDT 2007
I am using osg to render a scene, and osgCal to display some character
When I try to use osg::Fog in the scene, everything works fine except
for characters rendered by osgCal: They seem to get fogged only when
very far (lod?) but they aren't fogged at all when they are near.
Does anyone have any pointer to why this doesn't work, or where I should
be looking at? The stateset has been set with:
setAttribute( fog /* an osg::Fog */, osg::StateAttribute::ON );
setMode( GL_FOG, osg::StateAttribute::ON );
on the osg::Group containing the character I try to render.
Setting the mode to OVERRIDE or PROTECTED doesn't change the behaviour.
I think I must set a FOG shader flag in the osgCal core model but it
doesn't seem to be retrieved from the stateset.
I'm a little lost in the osgCal code, but I can't find a way to set the
HwMeshStateSetCache::createHwMeshStateSet seems not to read it from the
Thanks in advance for any pointer,
Laurent Di Cesare.
More information about the osg-users