[osg-users] Light Map Sub

David Heitbrink david-heitbrink at uiowa.edu
Wed Sep 6 15:04:18 PDT 2017


I have a number of scenes with a large number of old fashioned light maps. These light maps are basically textures that are set with blending and  I have a number of issues with these. 

I have 100's of these lights in the scene, but only a few a handful should be active in a scene at a time. At worst like 10. Its a really big scene.

So I wrote a cull-callback that would calculate a model view projection matrix for the light, and provide a texture index. This then calls back to a manager that sorts these by the X number of closest lights, and updates a uniform that contains a list of active lights for the current view.

I seem to be having an issue with the issue with my cull call back getting called when the light should be visible. At certain view angles I have lights just disappear. My question is, instead of trying to compile the lights by using a cull callback, would I be better creating my own drawable? and have it just make a callback to a manager handling the uniform with the light references instead of actually drawling anything.

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







More information about the osg-users mailing list