Hi Daniel,

If the vertex program is set to empty it means the the program with ID 0 is used - i.e. the fixed function pipeline. As the shadows are rendered below another camera, the original state of the scene graph should not be touched. As you seem to (ab)use a custom vertex shader for your billboards, you will have to provide a vertex shader for the shadow pass that at least:
1. applies the TexGen to the shadow map texture coordinates
2. rotates your billboards
3. transforms the vertices
Else your billboards won't show up in the shadow map correctly. I assume you meant "do not work" in the shadow pass. If you billboards are not showing up in the normal pass, I'd step back - disable the shadow mapping and make it work without shadows)

cheers
Sebastian

Hi there

I noticed that in StandardShadowMap, in the method ViewData::init starting from line 607 there is code that sets the cameras stateset to an empty shader program. Does this mean that all shaderprograms that are set in my scene graph are deactivated for the shadow pass?

I abuse some vertex shaders to rotate billboards into eye orientation. When the shadow pass disables these shaders, this would explain why my billboards do not work...

Can anyone confirm this?


Regards

Daniel



_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to