Hi, Garret,
Perhaps the reason for what happens is the part of code inherited from
StandardShadowMap which forces null Program on Shadow RTT rendering.
Perhaps osg::StateAttribute::PROTECT on your animation shader can do the
trick ? You may also try to comment that part and see if helps:
See line 606 in StandardShadowMap.cpp :
// optimization attributes
osg::Program* program = new osg::Program;
stateset-setAttribute( program, osg::StateAttribute::OVERRIDE |
osg::StateAttribute::ON );
HTH, Cheers,
Wojtek Lewandowski
2012/6/13 Garrett Cope garrett.cope@simcen.usuhs.edu
Hi,
I currently have an osg scene running that uses hardware skinning (via
osgAnimation) to animate some character models. Using these models as as
the shadow casters and a ground plane as the shadow receiver I've been
trying to test the various osgShadow implementations.
My issue is this:
When using LiSPSM, it appears that the casting scene used in the shadow
RTT is of a state prior to the models being updated by the animation
shader. This means that the shadow is more or less static - none of the
animations done by the hardware shader are reflected.
In contrast, SoftShadowMap produces a very nice shadow that incorporates
all of the animation pieces, but of course is limited by scene size.
Any ideas on how I can force the model update prior to the shadow RTT with
LisSPSM?
...
Thank you!
Cheers,
Garrett
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=48278#48278
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org