Robert, > > cv.setTraversalMask( traversalMask & > > getShadowedScene()->getCastsShadowTraversalMask() ); > > > > If there is always overlap, then &= with traversalmask is a no-op. That > isn't logical. > > The intention is that traversal is restricted to only subgraphs that > have the CastShadow bits enabled on them.
That intention would be accomplished by this code: cv.setTraversalMask( getShadowedScene()->getCastsShadowTraversalMask() ); &ing with the traversalmask does not accomplish anything useful: 1. in the case of overlapping bits it does nothing. 2. in the case of non-overlapping bits it results in a bug. > I stand by the code, I believe it is correct. Disabling the > CastShadow bits in the viewer should mean that the ShadowScene won't > traverse the subgraphs that request the CastShadow bits to be set. Yes, and that logic is preserved by the fix i proposed. I'm know you're very busy, but really this is a simple 1-line fix, applying the fix would keep users with non-default traversalMask from having to fork the OSG code in order to draw shadows. -Ben _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org