Hello Rabbi,

I am writing my own shader (glsl) for rendering. Can anyone show me how to draw 
shadow in the scene? What is in the texture unit used by softshadow map. Is 
that depth, grey scale color ?

You can check the default shaders in src/osgShadow/SoftShadowMap.cpp and just use the same code in your shader. Use the same sampler and uniform variable names and do the same calculation (shadow2DProj texture access and then use that to decide what the final color will be).

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

Reply via email to