Hi Terry, W.r.t implementing custom shaders in client scene graphs, I have pondered on this issue previously and came to conclusion that we'd either need to traverse the scene graph in setup and remap the StateSet/StateAttribute to inser the new shaders, or do this remapping at runtime with the CullVisitor in the cull traversal or osg::State in the draw traversal doing the remapping, . This will obviously require runtime remapping would obviously require mods to the core osg and osgUtil.
Yes, this sort of things sound really invasive, which is why I have so far just tried to render good shadow maps and not define how they are applied to a scene. A good flexible, halfway solution might be to have osgShadow supply osg::Shaders that users could link with their own osg::Programs. - Terry
I'll leave anything like this to later though, first get something working, find the limitations, then figure out a way to refactor things to make it more streamlined. Robert.
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
