Hi all,

Thanks to Jean-Sebastien for quick response about custom shaders with osg ShadowMap.

I’m trying to compute shadows in a scene and apply them to each object. Most of the objects have different shaders. I have to smuggle information about shadows into each object’s shader. The only way I can see how to do this is to compute shadows of the scene into texture and pass the texture to each shader. I thought that the easiest way would be to use osg ShadowMap. I tried modifying ShadowMap’s shaders. It worked but in that case one shader is applied to the whole scene. Is there a way to get Shadow texture from osg ShadowMap and pass it to another shader? Am I going in a right direction? Should I use osg ShadowMap to get shadow texture and pass it to different shaders or something else?

Thank you for your time,

Denis
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to