Thanks for your advices ! I've tested the uniform one by changing the shadow
technique shader and it works great.

Cheers,

On Thu, Jun 25, 2009 at 4:28 AM, Jean-Sébastien Guay <
[email protected]> wrote:

> Hi Serge,
>
>  Anyone knows if there is a way to force an object to not receive the
>> shadows ? Even with a "dirty" method (reseting it's tex coords on the
>> drawable or something like that).
>>
>
> Wojtek is right (of course, having implemented some of the ShadowMap
> techniques in OSG, he would know), ReceivesShadowTraversalMask is typically
> not used in ShadowMap techniques, as it would be a bit hard to implement
> generally.
>
> What we do is we have a uniform ShadowEnabled which if disabled skips the
> shadow map lookup in the shadow map shader. For this to work you have to
> replace your shadow technique's shader with one that will use whatever
> uniform you set, and you need to set a uniform to false (and make it default
> to true in your root ShadowedScene) instead of using the
> ReceivesShadowTraversalMask.
>
> So it's a bit inconvenient, you have two different ways of doing things -
> CastsShadowTraversal mask to make something not cast shadows, and a uniform
> to make it not receive shadows. Though it's kind of appropriate if you think
> about it, the former is "do I use this object for shadows", and the latter
> is "do I use the shadows on this object", so intuitively the former is a
> node mask and the latter is a shader parameter for the output.
>
> Hope this helps,
>
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay    [email protected]
>                               http://www.cm-labs.com/
>                        http://whitestar02.webhop.org/
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Serge Lages
http://www.tharsis-software.com
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to