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

Christian Buchner christian.buchner at gmail.com
Thu Apr 28 05:14:50 PDT 2016


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 Christian Buchner <christian.buchner at gmail.com>:

>
> 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 <
> pierre-jean.petitprez at inria.fr>:
>
>> 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 behaves like if the
>> top face did not stop the light to continue its path through the object
>> (which is not transparent).
>> My example is with soft shadow but I tested with other techniques and it
>> is the same behaviour.
>>
>> Is there a way to avoid such behaviour with osgShadow ?
>> Thank you.
>>
>> Cheers,
>> Pierre-Jean
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160428/abfcf7ea/attachment-0003.htm>


More information about the osg-users mailing list