[osg-users] Shadows : Creating multiple osgShadow::ShadowedScene

Robert Graf muzzleburst at gmail.com
Sun May 24 18:26:40 PDT 2015


Howdy all,

What is a way to have a ShadowedScene update just its shadow texture unit in the pre-render for its children, and not have its children rendered during the main viewer pass?

I'd like to set up multiple lights, each with its own shadow map. Each light/shadowmap combination will be a ShadowedScene. These ShadowedScene's will be pre-rendered, each in their own shadow map texture unit. Then in the main viewer pass, a custom fragment shader will use the different shadow map texture units for shadowing. For the main viewer pass, only the regular scene will be rendered, not any of the shadowed_scene's.

The scene would look something like this:

- root
|--- shadowed_scene1
|     |--- scene
|--- shadowed_scene2
|     |--- scene
|--- shadowed_scene3
|     |--- scene
|--- scene

Thanks!
-Robert

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








More information about the osg-users mailing list