[osg-users] Multiple pointlights deferred rendering in OSG, how to setup scenegraph?

antiro black antiro42 at gmail.com
Fri Sep 8 07:39:26 PDT 2017


Hi,

I'm slowly porting my pure opengl deferred rendering engine to make it OSG based.

In the original project I kept track of a list of all point lights. For each light I'd store its properties and a light volume. When rendering a frame, I'd go over this list and do a stencil pass followed by the actual lighting pass.

What would something like this look like in OSG?

My attempt so far:
I have all my light volumes in a specific subgraph and for each volume I have all the relevant light properties attached as uniforms of their statesets.
I was thinking that I could create a visitor that does does the stencil and lighting pass for each volume? 

Does that sound like a good idea? or should I go for a different approach?
If anyone has some information on how to implement this or has some example code that would probably speed things up significantly.


Thank you!

Cheers,
antiro

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







More information about the osg-users mailing list