Hi all I have a small change I needed to do in order for VDSM to work properly.
Its at the very end of the ViewDependentShadowMap::cull method: Original: Code: if (settings->getApplyShadowToSceneCallback()) settings->getApplyShadowToSceneCallback()->applyStateSet(&cv, selectStateSetForRenderingShadow(*vdd)); else decoratorStateGraph->setStateSet(selectStateSetForRenderingShadow(*vdd)); Proposition: Code: osg::StateSet* sceneStateSet = selectStateSetForRenderingShadow(*vdd); if (settings->getApplyShadowToSceneCallback()) settings->getApplyShadowToSceneCallback()->applyStateSet(&cv, sceneStateSet); decoratorStateGraph->setStateSet(sceneStateSet); This minor change doesn't break anything, but it allows me to do changes in the callback (add textures and uniforms custom shader) and then have the modified stateset pushed in to the decoratorStateGraph. Previously this was not possible. Regards Daniel ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62668#62668 _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
