> > Or, attach an empty osg::Program to get the fixed pipeline. If you're just > using the default shadow shader for your shadows, the fixed pipeline for > your cars might be sufficient instead of having to write a shader without > shadowing yourself. > > car_node->getOrCreateStateSet()->setAttributeAndModes( > new osg::Program, osg::StateAttribute::ON); >
That makes every car receive some weird, colorful noise. Firstly, I notice that you are using OSG 2.6. The versatility of the API > into the shadowing stuff is much better in the 2.7 versions, and allows you > better control over what is being applied, so I recommend you move to that > if you can. > I've just compiled and tried OSG 2.7.4. But I don't understand what you mean by "better control". I was expecting to see, in the header ShadowedScene, something like: - setOnlyReceivesShadowTraversalMask - setOnlyCastsShadowTraversalMask - setCastsAndReceivesShadowTraversalMask Perhaps that could be implemented? Otherwise, how would you do, in OSG 2.7, to disable self-shadowing? Thanks, Jefferson 2008/11/2 Jean-Sébastien Guay <[EMAIL PROTECTED]> > Hi Jefferson, > > Once again, a complement to the info David provided: > > Create a shader - you can use the GLSL in ShadowMap.cpp as a starting >> point - and then bind it to your car node stateset with the "usual" methods >> > > Or, attach an empty osg::Program to get the fixed pipeline. If you're just > using the default shadow shader for your shadows, the fixed pipeline for > your cars might be sufficient instead of having to write a shader without > shadowing yourself. > > car_node->getOrCreateStateSet()->setAttributeAndModes( > new osg::Program, osg::StateAttribute::ON); > > Hope this helps, > > J-S > -- > ______________________________________________________ > Jean-Sebastien Guay [EMAIL PROTECTED] > http://www.cm-labs.com/ > http://whitestar02.webhop.org/ > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

