Hello Dominic,

I would like to have my object cast a shadow to its environment with ShadowMap and ShadowedScene. This works, but - like ShadowMap defines - there are shadows on the object self. It is not possible to turn off these shadows, is it?

The ShadowMap-based techniques only honor the CastShadow node mask. If you need to have a node to not receive shadows, you'll need to create a custom shader (you can base it on the shaders which are applied by default to ShadowMap-based techniques, which can be found in the source .cpp file for the technique (in src/osgShadow) and then add for example a uniform bool receivesShadow, which you'll set to true on your root node and false on your node which you don't want to have shadows on it. Then in the shader you check that uniform before doing the shadow map lookup.

However if you need a node to cast shadows on all but itself, and receive shadows from all bit itself, I'm not sure how you'd achieve that. What I describe above will result in the node casting shadows on everything, but not receiving shadows from anything (including itself).

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to