At the moment, I implemented ShaderLight class that extends osg::Light and 
allows to use several point lights with per-pixel lighting (using my shaders). 
It works on android emulator.

I'm not sure about where is a best place to add that lights' uniforms to scene 
graph (e.g. rootStateSet->addUniform(myLight0->positionUniform); ). For now, I 
just call it after creating every light. I think ShaderLight object should do 
it itself, but how can it get a StateSet to which uniforms should be added?

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75213#75213





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to