Hi Zach,

On 11/9/06, Zach Deedler <[EMAIL PROTECTED]> wrote:
Hello,

Easy question.

I have a fog shader, and I want to disable it sometimes.
stateSet->setMode(GL_FOG, osg::StateAttribute::OFF) in a shader?

Fixed function pipeline is sweet for many things... shaders well make
the above rather more awkward...

Whats optimal?
1) remove the program from the stateset? or
2) set the program mode to OFF? or
3) add a bool on/off uniform to the shader?
4) Attach a switch node to the state set?

Switching StateSet to use different programs, or using a uniform value
to switch the shader path on/off would be my favorite solutions.

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

Reply via email to