Hello,

I am using osg to render a scene, and osgCal to display some character 
models.
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 
shader_flag_fog there.
HwMeshStateSetCache::createHwMeshStateSet seems not to read it from the 
stateset?

Thanks in advance for any pointer,
Laurent Di Cesare.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to