[osg-users] OpenGL ES 2.0 and LIGHTING

Grigoriy Mylnikov digitalw0lf at yandex.ru
Mon Nov 19 08:46:54 PST 2018

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:

More information about the osg-users mailing list