HI Brian,

If shaders are being used for lighting then all you can do is change
uniforms or change the shaders themelves, no enabling or disabling of
the GL_LIGHTING etc will make a difference.  Putting in callbacks
won't help either - you have to substitute the shaders being used, and
the OSG's standard state inheritance mechanism or just traversing
through the scene will help.

Robert.

On 3 Nov 2006 17:00:35 -0000, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi,

I have been trying to disable lighting in my RTT CameraNode.  Well, I have
discovered that it is not a true light that I am concerned with here.  The
lighting is being implemented through a shader that a coworker wrote, so
the stateset management has been working all along.  However, since the
shader has no knowledge of this, it continues to produce lighting effects.

While I am using Delta3D as my rendering package, the core OSG is exposed
to me.  I have set up a preframe callback for my main Producer camera, and
I'm using a node visitor with an update callback for the CameraNode.

Closer inspection of my code (it's been several months since I set it up
originally) reveals that my rendering is set up like

CameraNode
Producer camera -> scene -> CameraNode -> drawables

No RTT
Producer camera -> scene -> drawables


I'm using osgNV to modify the shader uniform for disabling the light
shader, and while both the preframe callback and node visitor update
callback are hit, only the changes made by the preframe callback are taken
into account.  Setting the light uniform in the preframe callback to render
renders the light for both cameras even though I'm saying otherwise in the
node visitor update callback.

I'm obviously going about this the wrong way, but I don't know what other
way to go.  I've also tried setting up a frame buffer object update
callback like:


   osg::FrameBufferObject *fbo = new osg::FrameBufferObject();

   // actually, fbo is a ref pointer, but to help it fit on one line
   // I removed that code.

   fbo->setUpdateCallback(new FboCallback(true));

This had absolutely no effect.  The callback's () operator was never hit.

Any help would be greatly appreciated.

Thanks,
Brian
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to