Hi Jose,
When I use shadowedscene with shadowmap and clouds, clouds are a little black!
How can I delete this effect?
Please search the archives in the future, this is a frequently asked
question.
There are two ways to make it so that shadows are not applied to the
clouds:
1. Customize the shader applied to them so it doesn't do the shadow test
(or remove the shader altogether). If you don't put a shader on that
object, it inherits the one from higher in the graph (probably the one
ShadowMap uses). See src/osgShadow/ShadowMap.cpp in the OSG source code.
If you just want to remove this shader, you can do:
node->getOrCreateStateSet()->setAttributeAndModes(
new osg::Program, osg::StateAttribute::OFF);
because a program with no shaders means the fixed pipeline.
2. Put your objects outside the shadowed scene. I.e. have a root
osg::Group which has as children the osgShadow::ShadowedScene, and put
your clouds under that root and not under the shadowed scene.
root
/ \
shadowedScene other non-shadowed objects
|
shadowed objects
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