I have a shader applied to the whole scene. I want to disable some nodes from being shaded. Creating an empty program didn't disable the shading for those nodes. Maybe I had to use Override or something?
Zach -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Guthrie Sent: Monday, January 08, 2007 11:12 To: osg users Subject: Re: [osg-users] StateSet issue Oh, if you need it to work, just create an osg::Program and pass it to the state set without doing anything else. The program will be empty and it will disable the shaders. I've never coded that in an osg file, though. On Jan 8, 2007, at 11:08 AM, Zach Deedler wrote: > I agree. (since I haven't been able to get the empty osg::Program > thing to > work) > > > Zach > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of David > Guthrie > Sent: Monday, January 08, 2007 11:00 > To: osg users > Subject: Re: [osg-users] StateSet issue > > It might be a nice feature if OSG supported doing this, that is one > could turn off shaders and it would assign an empty program but hold > onto the last program. Then it could be turned back on again. As > often as people have this problem, it could be nice to work around it. > > My two cents, > David > > On Jan 8, 2007, at 10:47 AM, Robert Osfield wrote: > >> Hi Joakim, >> >> Unfortunately you can't turn GLSL shaders off using a mode change as >> OpenGL itself doesn't support this for GLSL. This is a real shame >> w.r.t consistency with the rest of the OSG/OpenGL. The way to switch >> off shaders is to assign an empty osg::Program to the stateset that >> you don't want GLSL to be active on. >> >> Robert. >> >> On 1/8/07, Joakim Simonsson <[EMAIL PROTECTED]> wrote: >>> >>> Hi, >>> >>> * I have one group that contains two geodes, A and B. >>> * The group has a StateSet with a shader. >>> * My goal is to modify the StateSet of geode B, so the shader >>> doesn't apply for that node. >>> >>> B's state set: >>> >>> StateSet { >>> UniqueID StateSet_2 >>> DataVariance STATIC >>> rendering_hint DEFAULT_BIN >>> renderBinMode INHERIT >>> 0x24 OFF This should turn shaders >>> off >>> } >>> >>> But it seems that it still inherits the stateset from the parent >>> node (the group node), i.e. the shader is not turned off for the B >>> node. >>> >>> Any clues? >>> >>> >>> -- >>> Joakim Simonsson >>> >>> _______________________________________________ >>> 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/ >> > > _______________________________________________ > 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/ > _______________________________________________ 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/
