[osg-users] Shadow Map

Jean-Sébastien Guay jean-sebastien.guay at cm-labs.com
Tue Sep 2 12:58:10 PDT 2008

Bonjour Cedric,

> It seems that shadow map technique apply the 'shadow receiver' stateset 
> even if the nodemask has not been flaged to receive the shadow.  Is 
> there someone who resolve this case ? Or maybe i miss something ?

osgShadow::ShadowMap only uses the CastShadow nodemask (by including an 
object in the shadow map RTT or not). It does not use the ReceiveShadow 

One way you can implement this is by replacing the ShadowMap shaders 
with your own shaders, in which you would have a flag that says if a 
given subgraph should receive shadows. This flag would be a uniform bool 
variable, and you would put an osg::Uniform with the appropriate name 
and a false value in the stateset of the root node of the subgraph where 
you don't want to receive shadows.

> I read in the mailing list that there will be an ShadowMapStandard that 
> will replace the actual (2.6) shadowmap technique. I have not seen this 
> class in the svn yet. I dont know if i should try to resolve the issue 
> (if it is) in the actual shadowmap or if i should wait because something 
> new will be in svn quickly.

At this point it is not yet sure that StandardShadowMap will replace 
osgShadow::ShadowMap. We'll see. There's still some work to be done to 
work up to that.

Hope this helps,

Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com

More information about the osg-users mailing list