Hi, 

It's been about a month since I looked at this, but I'm finally able to get 
back to it.  Can you please explain how to override the inherited setting 
for the RTT CameraNode's StateSet?  I know how to add a Uniform value to a 
StateSet, but I am not familiar with how to override the value for the 
osg::Uniform of a parent node.  

I know how to override or inherit values using the setMode and/or 
setAttributesAndModes functions of the StateSet, but I have never used them 
in conjunction with a shader's Uniform value.

Thanks,
Brian


> Hi Brian,
> 
> You should be able to define a StateSet on the RTT Camera subgraph
> that contains a osg::Uniform that overrides the inherited setting.
> 
> For maximum performance you might want to just use a different shader
> though, one that doesn't have any lighting path.
> 
> Robert.
> 
> > Hi,
> >
> > I have an application that I'm developing that uses RTT to render's an
> > image to a quad in my scene that is based on the overall scene. Best
> > analogy that I can give is that the rendered quad is similar to a 
security
> > camera. The main display consists of a drawable that has a shader 
program
> > attached to it to produce lighting effects. The shader has a parameter
> > that allows the lighting effect to be toggled. The security camera is
> > rendered using a series of camera nodes. Each camera node has a quad, a
> > texture, and a shader attached to the geometry node for the quad. All 
this
> > works nicely.
> >
> > The problem that I have run into is that ideally, I would like to toggle
> > the lighting effects shader for the RTT. Currently, the main display's
> > shader has lighting enabled, but the lighting effects are carried into 
the
> > RTT for the security camera. Ideally, I'd like to enable the main
> > display's lighting effects, but disable them for the RTT so that I can
> > produce more realistic effects like night vision if that is possible.
> >
> > One thing to keep in mind is that all lighting effects are done through 
> > the
> > shader, but I do have a flag in the shader program that can disable the
> > effect.
> >
> > I'm guessing that either node visitors or setting a cull mask might be 
the
> > way to go, but I haven't had any luck with either of those methods. It's
> > very possible that I'm going about it the wrong way. Any ideas?
> >
> > 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