Re: [osg-users] ShadowMap uses wrong mask for traversal

2008-05-22 Thread Robert Osfield
Hi Ben, On Thu, May 22, 2008 at 10:38 AM, Ben Discoe <[EMAIL PROTECTED]> wrote: > 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 o

Re: [osg-users] ShadowMap uses wrong mask for traversal

2008-05-22 Thread Ben Discoe
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 CastShad

Re: [osg-users] ShadowMap uses wrong mask for traversal

2008-05-22 Thread Roger James
> > From: Robert Osfield > > Sent: Tuesday, May 20, 2008 10:47 PM > > > > Hi Ben, > > > > I've just done a quick review and the code looks correct to me. > > > > > Now ShadowMap comes along, and the above code computes (0x4 & 0x2) == > 0. > > A visitor mask of 0 finds nothing. That's not right.

Re: [osg-users] ShadowMap uses wrong mask for traversal

2008-05-22 Thread Robert Osfield
Hi Ben, > If you are saying that avoiding conflict between bit values is inappropriate, > that there should always be overlap, then what use does this statement serve: > > cv.setTraversalMask( traversalMask & > getShadowedScene()->getCastsShadowTraversalMask() ); > > If there is always overlap,

Re: [osg-users] ShadowMap uses wrong mask for traversal

2008-05-22 Thread Ben Discoe
> - > From: Robert Osfield > Sent: Wednesday, May 21, 2008 10:20 PM > > On Thu, May 22, 2008 at 8:22 AM, Ben Discoe <[EMAIL PROTECTED]> wrote: > > I'm sorry, but a node mask of 0 matches no nodes, and that's definitely > not correct; this Visitor is supposed to find nodes which are drawn and >

Re: [osg-users] ShadowMap uses wrong mask for traversal

2008-05-22 Thread Ben Discoe
> - > From: J.P. Delport > Sent: Wednesday, May 21, 2008 9:51 PM > > I've not been following the discussion in detail, have only a single > comment below... > > > The code: > > > >>> cv.setTraversalMask( traversalMask & > >>> getShadowedScene()->getCastsShadowTraversalMask() ); > > > > Usin

Re: [osg-users] ShadowMap uses wrong mask for traversal

2008-05-22 Thread Robert Osfield
Hi Ben, On Thu, May 22, 2008 at 8:22 AM, Ben Discoe <[EMAIL PROTECTED]> wrote: > I'm sorry, but a node mask of 0 matches no nodes, and that's definitely not > correct; this Visitor is supposed to find nodes which are drawn and cast > shadows. If it finds no nodes, it's not correct. The questio

Re: [osg-users] ShadowMap uses wrong mask for traversal

2008-05-22 Thread J.P. Delport
Hi, I've not been following the discussion in detail, have only a single comment below... Ben Discoe wrote: - From: Robert Osfield Sent: Tuesday, May 20, 2008 10:47 PM Hi Ben, I've just done a quick review and the code looks correct to me. Now ShadowMap comes along, and the above code

Re: [osg-users] ShadowMap uses wrong mask for traversal

2008-05-22 Thread Ben Discoe
> - > From: Robert Osfield > Sent: Tuesday, May 20, 2008 10:47 PM > > Hi Ben, > > I've just done a quick review and the code looks correct to me. > > > Now ShadowMap comes along, and the above code computes (0x4 & 0x2) == 0. > A visitor mask of 0 finds nothing. That's not right. > > No it'

Re: [osg-users] ShadowMap uses wrong mask for traversal

2008-05-21 Thread Robert Osfield
Hi Ben, I've just done a quick review and the code looks correct to me. > Now ShadowMap comes along, and the above code computes (0x4 & 0x2) == 0. A > visitor mask of 0 finds nothing. That's not right. No it's perfectly correct, this is how traversal masks are meant to be used. However, if b

[osg-users] ShadowMap uses wrong mask for traversal

2008-05-20 Thread Ben Discoe
I found what appears to be another bug/limitation in ShadowMap.cpp. When traversing the nodes which cast shadows, it uses this code: cv.setTraversalMask( traversalMask & getShadowedScene()->getCastsShadowTraversalMask() ); 'traversalMask' here is the sceneview's draw mask, which defaults to