Re: [osg-users] Shadow projected on the opposite side too

2016-04-28 Thread Pierre-Jean Petitprez
Hi Robert, Sorry for the missing information. I use SoftShadow technique, but tested with other techniques and they always produce the same effect. And indeed I have a second light which is linked to the camera (moves with the camera). I totaly forgot this light and I think it does not work

Re: [osg-users] Shadow projected on the opposite side too

2016-04-28 Thread Robert Osfield
Hi Pierre, I think there is probably a couple of issues. You don't say which osgShadow::ShadowTechnique you use, it may well be you've picked a very simple one that isn't capable of handling this type of geometry combination. Second, shadows on back faces should be the same colour as the back

Re: [osg-users] Shadow projected on the opposite side too

2016-04-28 Thread Pierre-Jean Petitprez
Hi Sebastian and Christian, Thanks for your answers. This might have to do with wrong culling mode or geometry for the shadowmap-generation. The culling mode should be front-face and your geometry should be correct (e.g. if you do front-face culling you should have some "inner" sides to

Re: [osg-users] Shadow projected on the opposite side too

2016-04-28 Thread Christian Buchner
Oh oops, I am sorry I misunderstood your question. I was talking about reverse projection where the shadow is also received inside a the frustum at the opposite side of e.g. a point light source. So my solution would not apply to your problem. Apologies. Christian 2016-04-28 13:57 GMT+02:00

Re: [osg-users] Shadow projected on the opposite side too

2016-04-28 Thread Christian Buchner
if the w coordinate of your projected shadow texture coordinate is < 0, you should reject the shadow. This is quite easy to do in GLSL. The same technique can be used both for projective texture mapping and for shadow mapping. Christian 2016-04-28 11:40 GMT+02:00 Pierre-Jean Petitprez <

[osg-users] Shadow projected on the opposite side too

2016-04-28 Thread Pierre-Jean Petitprez
Hi dear OSG users, I'm wondering how to correctly use osgShadow. As you can see on the file I have attached, the shadow map is projected on the receiving object also on a face which should normaly not receive the shadow from the sphere (on my example the light is at the top right corner). It