<div dir="ltr"><div><div><div><br></div>if the w coordinate of your projected shadow texture coordinate is < 0, you should<br>reject the shadow. This is quite easy to do in GLSL.<br><br></div>The same technique can be used both for projective texture mapping and for shadow<br>mapping.<br><br></div>Christian<br><br><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-04-28 11:40 GMT+02:00 Pierre-Jean Petitprez <span dir="ltr"><<a href="mailto:pierre-jean.petitprez@inria.fr" target="_blank">pierre-jean.petitprez@inria.fr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi dear OSG users,<br>
<br>
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 behaves like if the top face did not stop the light to continue its path through the object (which is not transparent).<br>
My example is with soft shadow but I tested with other techniques and it is the same behaviour.<br>
<br>
Is there a way to avoid such behaviour with osgShadow ?<br>
Thank you.<br>
<br>
Cheers,<br>
Pierre-Jean<br>
<br>_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
<br></blockquote></div><br></div>