[osg-users] Shadow Map
lewandowski at ai.com.pl
Tue Sep 2 13:12:11 PDT 2008
In my opinion other option is to put ShadowedScene as a subgraph. And add
nodes not requiring shadows outside this subgraph. That way node mask is not
neccessary at all and shadows won't be cast on these nodes.
> 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
osg-users mailing list
osg-users at lists.openscenegraph.org
More information about the osg-users