Neat. I did the same thing for a game I wrote, but I used custom shader-based lights instead of OpenGL lights, and I used 4 lights instead of 8. The most interesting takeaway was that applying shaders for 0, 1, 2, 3, or 4 lights (5 different shaders) was very slow due to shader swapping. The fastest combination I found was to only compile shaders for 0 or 4 lights, and if I only needed to apply 1, 2, or 3 lights I could set some of their color uniforms to black. -- Terry Welsh http://www.reallyslick.com
> > Hi, > > Check out my solution - no shaders needed: > http://forum.openscenegraph.org/viewtopic.php?t=15339 > > Cheers, > Jannik > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=69123#69123 > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org