Hi, Sebastian. So you compose one shader per object?
Thanks. 2013/11/7 Sebastian Messerschmidt <sebastian.messerschm...@gmx.de> > Hi Michael, > > I solved a similar problem by overriding osg::Program which composes a > shader from an Ubershader. This is not done via uniforms but defines. > It seems to work somehow and improved the performance over branching based > on uniforms. > > > Hi. > > I decided to go with single pipeline that provides big shaders and > objects using own uniforms and textures to change the pipeline behaviour. > I started to design a simple material format so that it resembles the one > of EffectCompositor. > > Thanks. > > > 2013/10/31 michael kapelko <korn...@gmail.com> > >> Hi, Wang. >> >> I've just checked if I can use some uber shader and control its >> behaviour per object by setting the object's uniforms. And it works. >> I wonder if that's ok to do that to make different objects rendered >> differently in the same scene. >> Thanks. >> >> >> 2013/10/31 Wang Rui <wangra...@gmail.com> >> >>> Hi Michael, >>> >>> Effect compositor in fact adds the child scene graph to a camera >>> binding to a FBO, and then uses RTT cameras to perform the post processing >>> work. The last step is always to show the final image on an HUD quad so all >>> other scene nodes will be occluded. The only way to make the effect >>> compositor work with other fixed pipeline nodes is to write to the depth >>> values in the shader code of the last step, which cannot be automated. >>> >>> The dof.xml does such work so you may try ./osgeffectcompositor >>> --normal-scene cessna.osg --effect dof.xml to see how normal and deferred >>> shaded objects are merged. At present I haven't had a better idea about >>> this problem. :-) >>> >>> Wang Rui >>> >>> >>> >>> 2013/10/30 michael kapelko <korn...@gmail.com> >>> >>>> Hi. >>>> I've recently implemented deferred shading with normal mapping and >>>> shadow mapping using EffectCompositor, but it has effect on the whole >>>> scene, not a single object. >>>> Is it possible to use EffectCompositor to apply effects per object? >>>> Thanks. >>>> >>>> _______________________________________________ >>>> osg-users mailing list >>>> osg-users@lists.openscenegraph.org >>>> >>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >>>> >>>> >>> >>> _______________________________________________ >>> osg-users mailing list >>> osg-users@lists.openscenegraph.org >>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >>> >>> >> > > > _______________________________________________ > osg-users mailing > listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org