Hi Roland,

I am glad that someone is digging this subject. I wrote simple visitor that
generates shaders from accumulated state sets. Custom state mask (int) is
extracted from stateset (LIGHT, FOG, DIFFUSE_MAP, NORMAL_MAP, etc). Based on
this mask  shaders are generated and attached to drawables. Shaders
are cached so there is only a few of them.

Right now I am quite busy at work. I will refactor my code to strip out
customer specific stuff. I hope today late evening (Europe) I will send you
working code.

Regards,
Maciej


2009/3/3 Roland Smeenk <osgfo...@tevs.eu>

> Mike,
>
> I know of shadergen. It was already mentioned earlier in this thread. It
> will come in handy when recreating the ffp functionality in shaders.
> I am interested in existing osg code that does shader generation based on
> the osg state.
>
> --
> Roland
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=7885#7885
>
>
>
>
>
> _______________________________________________
> 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

Reply via email to