Hi Robert,

thank you for your answer but it still didn't solve my problem. If my graph starts at 'root' node, it will render correctly. The problem appears when I add 'group' as a starting node (with the 'camera' node as a child).

Is it possible that 'camera' node activates the global directional light? If it does, how could I disable it? Because I don't want the global directional light lit my scene.

Jan


On 06/15/2010 10:02 AM, Robert Osfield wrote:
Hi Jan,

The OSG by default enables a global directional light on GL_LIGHT0.
If you have a LightSource node that targets GL_LIGHT0 it'll override
this for the rendering stage that it's within.

Robert.

On Tue, Jun 15, 2010 at 7:38 AM, Jan Navratil<[email protected]>  wrote:
Hello,

I need help with setting lights in OSG.

My scene graph look like this:

      group
       /     \
quad       camera (PRE_RENDER)
                |
               root
                |
        shadowedScene (with ShadowMap)
        /             \
model           pointLight

First, I pre-render the shadowedScene to a texture (using FBO) and
then attach this texture to the quad. When OSG traverses the graph, it
correctly goes through the pointlight code (in ShadowMap) BUT after it
goes through the directional light code as well.

Where does this directional light come from? How could I disable it?

Thank you for you help.

Cheers, Jan
_______________________________________________
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

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

Reply via email to